Class: FoxTail::StepperComponent
Instance Attribute Summary
#html_attributes
Instance Method Summary
collapse
classname_merger, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
fox_tail_config
Constructor Details
#initialize(html_attributes = {}) ⇒ StepperComponent
Returns a new instance of StepperComponent.
13
14
15
16
17
|
# File 'app/components/fox_tail/stepper_component.rb', line 13
def initialize(html_attributes = {})
super
@index = 0
end
|
Instance Method Details
#before_render ⇒ Object
23
24
25
26
27
|
# File 'app/components/fox_tail/stepper_component.rb', line 23
def before_render
super
html_attributes[:class] = classnames theme.apply(:root, self), html_class
end
|
#call ⇒ Object
29
30
31
32
33
|
# File 'app/components/fox_tail/stepper_component.rb', line 29
def call
content_tag :ol, html_attributes do
steps.each { |step| concat step }
end
end
|
#render? ⇒ Boolean
19
20
21
|
# File 'app/components/fox_tail/stepper_component.rb', line 19
def render?
steps?
end
|