Class: Stupidedi::TransactionSets::Builder::Dsl::DocumentBodyDSL

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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