Class: Tramway::EntityComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Tramway::EntityComponent
- Defined in:
- app/components/tramway/entity_component.rb
Overview
Component for displaying an entity row in a list
Instance Method Summary collapse
Instance Method Details
#cells ⇒ Object
22 23 24 25 26 |
# File 'app/components/tramway/entity_component.rb', line 22 def cells decorated_item.class.index_attributes.reduce({}) do |hash, attribute| hash.merge! attribute => decorated_item.public_send(attribute) end end |
#decorated_item ⇒ Object
10 11 12 |
# File 'app/components/tramway/entity_component.rb', line 10 def decorated_item tramway_decorate item, namespace: entity.namespace end |