class Trestle::Breadcrumb::Trail

Public Class Methods

new(breadcrumbs=[]) click to toggle source
# File lib/trestle/breadcrumb.rb, line 31
def initialize(breadcrumbs=[])
  @breadcrumbs = Array(breadcrumbs).compact
end

Public Instance Methods

==(other) click to toggle source
# File lib/trestle/breadcrumb.rb, line 35
def ==(other)
  to_a == other.to_a
end
append(label, path=nil) click to toggle source
# File lib/trestle/breadcrumb.rb, line 43
def append(label, path=nil)
  @breadcrumbs << Breadcrumb.new(label, path)
end
dup() click to toggle source
# File lib/trestle/breadcrumb.rb, line 39
def dup
  self.class.new(@breadcrumbs.dup)
end
prepend(label, path=nil) click to toggle source
# File lib/trestle/breadcrumb.rb, line 47
def prepend(label, path=nil)
  @breadcrumbs.unshift(Breadcrumb.new(label, path))
end