Class: Arara::DataTableBodyCellComponent
- Inherits:
-
ActionView::Component::Base
- Object
- ActionView::Component::Base
- Arara::DataTableBodyCellComponent
- Includes:
- BaseComponent
- Defined in:
- app/components/arara/data_table_body_cell_component.rb
Instance Attribute Summary collapse
-
#numeric ⇒ Object
readonly
Returns the value of attribute numeric.
Instance Method Summary collapse
- #default_html_class ⇒ Object
-
#initialize(numeric: false, **kw) ⇒ DataTableBodyCellComponent
constructor
A new instance of DataTableBodyCellComponent.
Methods included from BaseComponent
#default_data_controller, #default_html_tag, #html_class, #html_content, #html_data, #html_options, #html_tag, included
Constructor Details
#initialize(numeric: false, **kw) ⇒ DataTableBodyCellComponent
Returns a new instance of DataTableBodyCellComponent.
8 9 10 11 |
# File 'app/components/arara/data_table_body_cell_component.rb', line 8 def initialize(numeric: false, **kw) super(tag: "td", **kw) @numeric = numeric end |
Instance Attribute Details
#numeric ⇒ Object (readonly)
Returns the value of attribute numeric.
4 5 6 |
# File 'app/components/arara/data_table_body_cell_component.rb', line 4 def numeric @numeric end |
Instance Method Details
#default_html_class ⇒ Object
13 14 15 16 |
# File 'app/components/arara/data_table_body_cell_component.rb', line 13 def default_html_class return "mdc-data-table__cell mdc-data-table__cell--numeric" if numeric "mdc-data-table__cell" end |