Class: Fidelity::Widget::Breadcrumb::Item

Inherits:
Object
  • Object
show all
Defined in:
app/fidelity/widgets/breadcrumb/breadcrumb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject

Returns the value of attribute content.



24
25
26
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24

def content
  @content
end

#labelObject

Returns the value of attribute label.



24
25
26
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24

def label
  @label
end

#pathObject

Returns the value of attribute path.



24
25
26
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 24

def path
  @path
end

#stateObject

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

Returns:

  • (Boolean)


32
33
34
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 32

def current?
  @state == :current
end

#unavailable?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'app/fidelity/widgets/breadcrumb/breadcrumb.rb', line 36

def unavailable?
  @state == :unavailable
end