class Padrino::Helpers::Breadcrumb

def add(name, url, caption, options = {})

Other tags:
    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)

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
  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 = {
    :name    => :home,
    :url     => DEFAULT_URL,
    :caption => DEFAULT_CAPTION,
    :options => {}
  }
  reset
end

def set_home(url, caption, options = {})

Other tags:
    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