Class: RKit::Grid::Base

Inherits:
Object show all
Defined in:
lib/r_kit/grid/base.rb

Direct Known Subclasses

Grid, GridCol

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#_bindingObject

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

#_attributesObject

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/r_kit/grid/base.rb', line 18

def _attributes
  raise NotImplementedError, 'Subclasses must implement this method'
end

#_hObject



14
15
16
# File 'lib/r_kit/grid/base.rb', line 14

def _h
  _binding.view_context
end

#captureObject

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/r_kit/grid/base.rb', line 26

def capture
  raise NotImplementedError, 'Subclasses must implement this method'
end

#required_bindingsObject

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/r_kit/grid/base.rb', line 9

def required_bindings
  raise NotImplementedError, 'Subclasses must implement this method'
end

#to_sObject



30
31
32
# File 'lib/r_kit/grid/base.rb', line 30

def to_s
  _h. _tag, _attributes, &method(:capture)
end