Class: RKit::Grid::Base
Instance Attribute Summary collapse
-
#_binding ⇒ Object
Returns the value of attribute _binding.
Instance Method Summary collapse
- #_attributes ⇒ Object
- #_h ⇒ Object
- #capture ⇒ Object
-
#initialize(binding) ⇒ Base
constructor
A new instance of Base.
- #required_bindings ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(binding) ⇒ Base
Returns a new instance of Base.
4 5 6 7 |
# File 'lib/r_kit/grid/base.rb', line 4 def initialize binding @_binding = binding _binding.mass_assign required_bindings end |
Instance Attribute Details
#_binding ⇒ Object
Returns the value of attribute _binding.
2 3 4 |
# File 'lib/r_kit/grid/base.rb', line 2 def _binding @_binding end |
Instance Method Details
#_attributes ⇒ Object
18 19 20 |
# File 'lib/r_kit/grid/base.rb', line 18 def _attributes raise NotImplementedError, 'Subclasses must implement this method' end |
#_h ⇒ Object
14 15 16 |
# File 'lib/r_kit/grid/base.rb', line 14 def _h _binding.view_context end |
#capture ⇒ Object
26 27 28 |
# File 'lib/r_kit/grid/base.rb', line 26 def capture raise NotImplementedError, 'Subclasses must implement this method' end |
#required_bindings ⇒ Object
9 10 11 |
# File 'lib/r_kit/grid/base.rb', line 9 def required_bindings raise NotImplementedError, 'Subclasses must implement this method' end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/r_kit/grid/base.rb', line 30 def to_s _h.content_tag _tag, _attributes, &method(:capture) end |