class Padrino::Helpers::Breadcrumb

def add(name, url, caption)

Other tags:
    Api: - public

Parameters:
  • caption (String) --
  • url (String) --
  • name (Symbol) --
  • name (String) --
def add(name, url, caption)
  items << { :name => name, :url => url.to_s, :caption => caption.to_s.humanize.html_safe }
end

def del(name)

Other tags:
    Api: - public

Parameters:
  • name (Symbol) --
  • name (String) --
def del(name)
  items.delete_if { |item| item[:name] == name.to_sym }
end

def initialize

Other tags:
    Api: - public
def initialize
  self.home = { :url => DEFAULT_URL, :caption => DEFAULT_CAPTION, :name => :home }
  reset
end

def reset

Other tags:
    Api: - public
def reset
  self.items=[]
  self.items << home
end

def reset!

Other tags:
    Api: - public
def reset!
  self.home = { :url => DEFAULT_URL, :caption => DEFAULT_CAPTION, :name => :home }
  reset
end

def set_home(url, caption)

Other tags:
    Api: - public

Parameters:
  • caption (String) --
  • url (String) --
def set_home(url, caption)
  self.home = { :url => url, :caption => caption.to_s.humanize.html_safe, :name => :home }
  reset
end