class Trestle::Breadcrumb
Attributes
label[R]
path[R]
Public Class Methods
cast(obj)
click to toggle source
# File lib/trestle/breadcrumb.rb, line 13 def self.cast(obj) case obj when Breadcrumb obj when String new(obj) when Array new(*obj) when NilClass, false nil else raise ArgumentError, "Unable to cast #{obj.inspect} to Breadcrumb" end end
new(label, path=nil)
click to toggle source
# File lib/trestle/breadcrumb.rb, line 5 def initialize(label, path=nil) @label, @path = label, path end
Public Instance Methods
==(other)
click to toggle source
# File lib/trestle/breadcrumb.rb, line 9 def ==(other) label == other.label && path == other.path end