Class: Report::Table
- Inherits:
-
Object
- Object
- Report::Table
- Defined in:
- lib/report/table.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #_body ⇒ Object
- #_head ⇒ Object
- #body(&blk) ⇒ Object
- #head(&blk) ⇒ Object
-
#initialize(name) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(name) ⇒ Table
4 5 6 |
# File 'lib/report/table.rb', line 4 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/report/table.rb', line 3 def name @name end |
Instance Method Details
#_body ⇒ Object
20 21 22 |
# File 'lib/report/table.rb', line 20 def _body @body end |
#_head ⇒ Object
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 |