Class: RKit::Grid::Base::GridRow
Instance Attribute Summary collapse
#_binding
Instance Method Summary
collapse
#_h, binding_accessor, #to_s
Constructor Details
#initialize(collection, binding:) ⇒ GridRow
Returns a new instance of GridRow.
5
6
7
8
|
# File 'lib/r_kit/grid/base/grid_row.rb', line 5
def initialize collection, binding:;
@collection = collection
super binding
end
|
Instance Attribute Details
#collection ⇒ Object
Returns the value of attribute collection.
3
4
5
|
# File 'lib/r_kit/grid/base/grid_row.rb', line 3
def collection
@collection
end
|
Instance Method Details
#_attributes ⇒ Object
18
19
20
|
# File 'lib/r_kit/grid/base/grid_row.rb', line 18
def _attributes
_binding.row_attributes
end
|
22
23
24
25
26
27
|
# File 'lib/r_kit/grid/base/grid_row.rb', line 22
def capture
collection.map do |object|
GridCol.new(object, binding: _binding).to_s
end
.reduce(:safe_concat)
end
|
#required_bindings ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/r_kit/grid/base/grid_row.rb', line 10
def required_bindings
{
row_attributes: {
class: :'grid-row'
}
}
end
|