Class: Voom::Presenters::DSL::Components::Table::Row
- Defined in:
- lib/voom/presenters/dsl/components/table.rb
Defined Under Namespace
Classes: Column
Instance Attribute Summary collapse
-
#checkbox(**attributes, &block) ⇒ Object
Returns the value of attribute checkbox.
-
#color ⇒ Object
Returns the value of attribute color.
-
#columns ⇒ Object
Returns the value of attribute columns.
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
- #column(value = nil, **attribs, &block) ⇒ Object
-
#initialize(type:, **attribs_, &block) ⇒ Row
constructor
A new instance of Row.
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(type:, **attribs_, &block) ⇒ Row
Returns a new instance of Row.
45 46 47 48 49 50 51 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 45 def initialize(type:, **attribs_, &block) super(type: type, **attribs_, &block) @columns = [] @color = attribs.delete(:color) self.checkbox(attribs.slice(:name, :value, :checked)) if @parent.selectable end |
Instance Attribute Details
#checkbox(**attributes, &block) ⇒ Object
Returns the value of attribute checkbox.
43 44 45 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 43 def checkbox @checkbox end |
#color ⇒ Object
Returns the value of attribute color.
43 44 45 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 43 def color @color end |
#columns ⇒ Object
Returns the value of attribute columns.
43 44 45 |
# File 'lib/voom/presenters/dsl/components/table.rb', line 43 def columns @columns end |