Class: TableFor::Base

Inherits:
Blocks::Base
  • Object
show all
Defined in:
lib/table_for/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_recordObject Also known as: current_row

Returns the value of attribute current_record.



8
9
10
# File 'lib/table_for/base.rb', line 8

def current_record
  @current_record
end

Instance Method Details

#header(name, options = {}, &block) ⇒ Object



11
12
13
# File 'lib/table_for/base.rb', line 11

def header(name, options={}, &block)
  define("#{name.to_s}_header", options, &block)
end

#set_current_record(record) ⇒ Object



15
16
17
# File 'lib/table_for/base.rb', line 15

def set_current_record(record)
  self.current_record = record
end