Class: FlexiAdmin::Components::Resources::ListViewComponent::Column
- Inherits:
-
Struct
- Object
- Struct
- FlexiAdmin::Components::Resources::ListViewComponent::Column
- Defined in:
- lib/flexi_admin/components/resources/list_view_component.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#options ⇒ Object
Returns the value of attribute options.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #formatted_value(value) ⇒ Object
- #label ⇒ Object
- #sort_by ⇒ Object
- #sortable? ⇒ Boolean
- #width ⇒ Object
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute
11 12 13 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 11 def attribute @attribute end |
#options ⇒ Object
Returns the value of attribute options
11 12 13 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 11 def @options end |
#value ⇒ Object
Returns the value of attribute value
11 12 13 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 11 def value @value end |
Instance Method Details
#formatted_value(value) ⇒ Object
28 29 30 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 28 def formatted_value(value) [:formatter].call(value) end |
#label ⇒ Object
16 17 18 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 16 def label [:label] end |
#sort_by ⇒ Object
24 25 26 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 24 def sort_by [:sortable].is_a?(TrueClass) ? attribute : [:sortable] end |
#sortable? ⇒ Boolean
20 21 22 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 20 def sortable? .key?(:sortable).present? || false end |
#width ⇒ Object
12 13 14 |
# File 'lib/flexi_admin/components/resources/list_view_component.rb', line 12 def width [:width] end |