Class: Report::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/report/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Table

Returns a new instance of Table.



4
5
6
# File 'lib/report/table.rb', line 4

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/report/table.rb', line 3

def name
  @name
end

Instance Method Details

#_bodyObject



20
21
22
# File 'lib/report/table.rb', line 20

def _body
  @body
end

#_headObject



17
18
19
# File 'lib/report/table.rb', line 17

def _head
  @head
end

#body(&blk) ⇒ Object



7
8
9
10
11
# File 'lib/report/table.rb', line 7

def body(&blk)
  b = Body.new self
  b.instance_eval(&blk)
  @body = b
end

#head(&blk) ⇒ Object



12
13
14
15
16
# File 'lib/report/table.rb', line 12

def head(&blk)
  h = Head.new self
  h.instance_eval(&blk)
  @head = h
end