Class: Superview::Components::TableComponent::Column
- Inherits:
-
Object
- Object
- Superview::Components::TableComponent::Column
- Defined in:
- lib/superview/components/table_component.rb
Instance Attribute Summary collapse
-
#item_template ⇒ Object
Returns the value of attribute item_template.
-
#title_template ⇒ Object
Returns the value of attribute title_template.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#item_template ⇒ Object
Returns the value of attribute item_template.
36 37 38 |
# File 'lib/superview/components/table_component.rb', line 36 def item_template @item_template end |
#title_template ⇒ Object
Returns the value of attribute title_template.
36 37 38 |
# File 'lib/superview/components/table_component.rb', line 36 def title_template @title_template end |
Class Method Details
.build(title:, &block) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/superview/components/table_component.rb', line 46 def self.build(title:, &block) new.tap do |column| column.title { title } column.item(&block) end end |
Instance Method Details
#item(&block) ⇒ Object
42 43 44 |
# File 'lib/superview/components/table_component.rb', line 42 def item(&block) @item_template = block end |
#title(&block) ⇒ Object
38 39 40 |
# File 'lib/superview/components/table_component.rb', line 38 def title(&block) @title_template = block end |