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

Inherits:
Object
  • Object
show all
Defined in:
lib/stupidedi/transaction_sets/builder/dsl.rb

Defined Under Namespace

Modules: ElementSyntax, LoopSyntax, SegmentSyntax, TableSyntax, ValuesSyntax Classes: DocumentBodyDSL, LoopBodyDSL, SegmentBodyDSL, TableBodyDSL

Class Method Summary collapse

Class Method Details

.build(shortcode, code, name, &block)

Build a definition for a given document using DSL-style. DSL style is a bit easier to use than manually building a syntax tree.



9
10
11
12
# File 'lib/stupidedi/transaction_sets/builder/dsl.rb', line 9

def self.build(shortcode, code, name, &block)
  body = DocumentBodyDSL.new(&block).tables
  Builder.build(shortcode, code, name, *body)
end