Class: Sbuilder::Ial::Model::TransactionBuilder

Inherits:
FunctionCallableBuilder show all
Defined in:
lib/model/model_dsl.rb

Instance Method Summary collapse

Methods inherited from FunctionCallableBuilder

#locals, #response

Methods inherited from CallableBuilder

#block, #name, #request

Instance Method Details

#buildObject



702
703
704
705
706
707
708
709
710
711
712
# File 'lib/model/model_dsl.rb', line 702

def build
  transaction = Transaction.new( Constants::IAL_TRANSACTION, @name )
  transaction.locals = @locals || []
  transaction.operation = @operation || ""
  transaction.response = @response || Sbuilder::Ial.response(){ properties [] }
  transaction.request = @request || Sbuilder::Ial.request() { properties [] }
  transaction.entryBlock = @entryBlock || BlockBuilder.new.build
  transaction.block = @block || BlockBuilder.new.build
  transaction.exitBlock = @exitBlock          
  transaction
end

#entryBlock(v = nil, &blk) ⇒ Object



694
695
696
697
698
699
700
# File 'lib/model/model_dsl.rb', line 694

def entryBlock(v=nil, &blk )
  if block_given?
    @entryBlock = Sbuilder::Ial.block( &blk )
  else
    @entryBlock=v; self;
  end
end

#exitBlock(v = nil) ⇒ Object



701
# File 'lib/model/model_dsl.rb', line 701

def exitBlock(v=nil); @exitBlock=v; self;end

#operation(v = nil) ⇒ Object



693
# File 'lib/model/model_dsl.rb', line 693

def operation(v=nil); @operation=v; self;end