Class: Bizflow::DomainInterpreter

Inherits:
Object
  • Object
show all
Defined in:
lib/bizflow/interpreters/domain_interpreter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo) ⇒ DomainInterpreter



8
9
10
# File 'lib/bizflow/interpreters/domain_interpreter.rb', line 8

def initialize(repo)
  @repo = repo
end

Instance Attribute Details

#process_interpreterObject

Returns the value of attribute process_interpreter.



6
7
8
# File 'lib/bizflow/interpreters/domain_interpreter.rb', line 6

def process_interpreter
  @process_interpreter
end

#repoObject

Returns the value of attribute repo.



6
7
8
# File 'lib/bizflow/interpreters/domain_interpreter.rb', line 6

def repo
  @repo
end

Instance Method Details

#process(name, &action) ⇒ Object



12
13
14
15
16
# File 'lib/bizflow/interpreters/domain_interpreter.rb', line 12

def process(name, &action)
  process_interpreter = Bizflow::ProcessInterpreter.new(name)
  process_interpreter.instance_eval(&action)
  repo.add_process(process_interpreter.process)
end