Class: Fidelity::Widget::Breadcrumb::Item
- Inherits:
-
Object
- Object
- Fidelity::Widget::Breadcrumb::Item
- Defined in:
- app/fidelity/widgets/breadcrumb/breadcrumb.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#label ⇒ Object
Returns the value of attribute label.
-
#path ⇒ Object
Returns the value of attribute path.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
- #current? ⇒ Boolean
-
#initialize(label = 'Item', content = nil, state = :default, path = '#') ⇒ Item
constructor
A new instance of Item.
- #unavailable? ⇒ Boolean
Constructor Details
#initialize(label = 'Item', content = nil, state = :default, path = '#') ⇒ Item
Returns a new instance of Item.
25 26 27 28 29 30 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 25 def initialize label='Item', content=nil, state=:default, path='#' @label = label @content = content @state = state @path = path end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
24 25 26 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24 def content @content end |
#label ⇒ Object
Returns the value of attribute label.
24 25 26 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24 def label @label end |
#path ⇒ Object
Returns the value of attribute path.
24 25 26 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24 def path @path end |
#state ⇒ Object
Returns the value of attribute state.
24 25 26 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24 def state @state end |
Instance Method Details
#current? ⇒ Boolean
32 33 34 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 32 def current? @state == :current end |
#unavailable? ⇒ Boolean
36 37 38 |
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 36 def unavailable? @state == :unavailable end |