Class: Arara::DataTableBodyCellComponent

Inherits:
ActionView::Component::Base
  • Object
show all
Includes:
BaseComponent
Defined in:
app/components/arara/data_table_body_cell_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#numericObject (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_classObject



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