Class: Tables::TrComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Tables::TrComponent
- Defined in:
- lib/app/components/tables/tr_component.rb
Instance Method Summary collapse
-
#initialize(index: 0) ⇒ TrComponent
constructor
A new instance of TrComponent.
Constructor Details
#initialize(index: 0) ⇒ TrComponent
Returns a new instance of TrComponent.
7 8 9 |
# File 'lib/app/components/tables/tr_component.rb', line 7 def initialize(index: 0) @bg_color = 'bg-gray-50' if index.odd? end |