Class: GridFu::Cell

Inherits:
Element show all
Defined in:
lib/grid_fu/cells.rb

Direct Known Subclasses

BodyCell, FooterCell, HeaderCell

Instance Method Summary collapse

Methods inherited from Element

#element_to_html, #to_html

Constructor Details

#initialize(*args, &block) ⇒ Cell

Returns a new instance of Cell.



3
4
5
6
7
8
9
# File 'lib/grid_fu/cells.rb', line 3

def initialize(*args, &block)
  self.value = block
  self.key   = args.first if args.first.is_a?(String) or args.first.is_a?(Symbol)

  # Bypass block evaling: in this case it's not a config but a value formatter
  super(*args, &nil)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GridFu::Element