Class: Stupidedi::TransactionSets::Builder::Dsl::DocumentBodyDSL
- Inherits:
-
Object
- Object
- Stupidedi::TransactionSets::Builder::Dsl::DocumentBodyDSL
- Includes:
- TableSyntax
- Defined in:
- lib/stupidedi/transaction_sets/builder/dsl.rb
Overview
A DSL for the body of a document, which allows defining tables.
Instance Attribute Summary collapse
-
#tables
Returns the value of attribute tables.
Instance Method Summary collapse
- #add_table(table)
-
#initialize(&block) ⇒ DocumentBodyDSL
constructor
A new instance of DocumentBodyDSL.
Methods included from TableSyntax
#get_table_contents, #table_detail, #table_header
Constructor Details
#initialize(&block) ⇒ DocumentBodyDSL
Returns a new instance of DocumentBodyDSL.
176 177 178 179 |
# File 'lib/stupidedi/transaction_sets/builder/dsl.rb', line 176 def initialize(&block) @tables = [] instance_eval(&block) end |
Instance Attribute Details
#tables
Returns the value of attribute tables.
181 182 183 |
# File 'lib/stupidedi/transaction_sets/builder/dsl.rb', line 181 def tables @tables end |
Instance Method Details
#add_table(table)
183 184 185 |
# File 'lib/stupidedi/transaction_sets/builder/dsl.rb', line 183 def add_table(table) tables << table end |