Class: FoxTail::TimelineComponent

Inherits:
BaseComponent show all
Defined in:
app/components/fox_tail/timeline_component.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#html_attributes

Instance Method Summary collapse

Methods inherited from BaseComponent

classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

This class inherits a constructor from FoxTail::BaseComponent

Instance Method Details

#before_renderObject



16
17
18
19
20
# File 'app/components/fox_tail/timeline_component.rb', line 16

def before_render
  super

  html_attributes[:class] = classnames theme.apply(:root, self), html_class
end

#callObject



22
23
24
25
26
# File 'app/components/fox_tail/timeline_component.rb', line 22

def call
   :ol, html_attributes do
    entries.each { |entry| concat entry }
  end
end

#render?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/components/fox_tail/timeline_component.rb', line 12

def render?
  entries?
end