class Padrino::Helpers::Breadcrumb
def add(name, url, caption, options = {})
- Api: - public
Parameters:
-
options
(Hash
) -- -
caption
(String
) -- -
url
(String
) -- -
name
(Symbol
) -- -
name
(String
) --
def add(name, url, caption, options = {}) items << { :name => name.to_sym, :url => url.to_s, :caption => caption.to_s.humanize.html_safe, :options => options } end
def del(name)
- Api: - public
Parameters:
-
name
(Symbol
) -- -
name
(String
) --
def del(name) items.delete_if { |item| item[:name] == name.to_sym } end
def initialize
- Api: - public
def initialize reset! end
def reset
- Api: - public
def reset self.items = [] self.items << home end
def reset!
- Api: - public
def reset! self.home = { :name => :home, :url => DEFAULT_URL, :caption => DEFAULT_CAPTION, :options => {} } reset end
def set_home(url, caption, options = {})
- Api: - public
Parameters:
-
options
(Hash
) -- -
caption
(String
) -- -
url
(String
) --
def set_home(url, caption, options = {}) self.home = { :url => url.to_s, :caption => caption.to_s.humanize.html_safe, :name => :home, :options => options } reset end