Class: Essence::TableComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Essence::TableComponent
- Defined in:
- app/components/essence/table_component.rb
Defined Under Namespace
Classes: Column
Constant Summary
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Instance Method Summary collapse
- #column(label) ⇒ Object
-
#initialize(rows: [], **html_options) ⇒ TableComponent
constructor
A new instance of TableComponent.
Methods inherited from ApplicationComponent
#assets_path, assets_path, images_directory
Methods included from Utils
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #integer_or_fallback
Constructor Details
#initialize(rows: [], **html_options) ⇒ TableComponent
Returns a new instance of TableComponent.
7 8 9 10 11 |
# File 'app/components/essence/table_component.rb', line 7 def initialize(rows: [], **) @columns = [] @rows = rows @html_options = end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
5 6 7 |
# File 'app/components/essence/table_component.rb', line 5 def columns @columns end |
#html_options ⇒ Object (readonly)
Returns the value of attribute html_options.
5 6 7 |
# File 'app/components/essence/table_component.rb', line 5 def @html_options end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
5 6 7 |
# File 'app/components/essence/table_component.rb', line 5 def rows @rows end |