Class: Bizflow::DomainInterpreter
- Inherits:
-
Object
- Object
- Bizflow::DomainInterpreter
- Defined in:
- lib/bizflow/interpreters/domain_interpreter.rb
Instance Attribute Summary collapse
-
#process_interpreter ⇒ Object
Returns the value of attribute process_interpreter.
-
#repo ⇒ Object
Returns the value of attribute repo.
Instance Method Summary collapse
-
#initialize(repo) ⇒ DomainInterpreter
constructor
A new instance of DomainInterpreter.
- #process(name, &action) ⇒ Object
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_interpreter ⇒ Object
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 |
#repo ⇒ Object
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 |