Class: Alchemy::Admin::Resource::Cell
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Alchemy::Admin::Resource::Cell
- Defined in:
- app/components/alchemy/admin/resource/cell.rb
Overview
Renders a table cell with the given css classes
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#css_classes ⇒ Object
readonly
Returns the value of attribute css_classes.
Instance Method Summary collapse
-
#initialize(css_classes, &block) ⇒ Cell
constructor
A new instance of Cell.
- #with_resource(resource) ⇒ Object
Constructor Details
#initialize(css_classes, &block) ⇒ Cell
Returns a new instance of Cell.
22 23 24 25 |
# File 'app/components/alchemy/admin/resource/cell.rb', line 22 def initialize(css_classes, &block) @css_classes = css_classes @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
14 15 16 |
# File 'app/components/alchemy/admin/resource/cell.rb', line 14 def block @block end |
#css_classes ⇒ Object (readonly)
Returns the value of attribute css_classes.
14 15 16 |
# File 'app/components/alchemy/admin/resource/cell.rb', line 14 def css_classes @css_classes end |
Instance Method Details
#with_resource(resource) ⇒ Object
27 28 29 30 |
# File 'app/components/alchemy/admin/resource/cell.rb', line 27 def with_resource(resource) @resource = resource self end |