Class: CPEE::ProcessTransformation::Target::CPEE
- Inherits:
-
Object
- Object
- CPEE::ProcessTransformation::Target::CPEE
- Defined in:
- lib/cpee/processtransformation/cpee.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(tree) ⇒ CPEE
constructor
A new instance of CPEE.
- #print_Break(node, res) ⇒ Object
- #print_InfiniteLoop(node, res) ⇒ Object
- #print_Loop(node, res) ⇒ Object
Constructor Details
#initialize(tree) ⇒ CPEE
Returns a new instance of CPEE.
28 29 30 |
# File 'lib/cpee/processtransformation/cpee.rb', line 28 def initialize(tree) @tree = tree end |
Instance Method Details
#generate ⇒ Object
31 32 33 34 35 36 |
# File 'lib/cpee/processtransformation/cpee.rb', line 31 def generate res = XML::Smart.string("<description xmlns='http://cpee.org/ns/description/1.0'/>") res.register_namespace 'd', 'http://cpee.org/ns/description/1.0' generate_for_list(@tree,res.root) res end |
#print_Break(node, res) ⇒ Object
46 47 48 |
# File 'lib/cpee/processtransformation/cpee.rb', line 46 def print_Break(node,res) res.add('break') end |
#print_InfiniteLoop(node, res) ⇒ Object
50 51 52 53 |
# File 'lib/cpee/processtransformation/cpee.rb', line 50 def print_InfiniteLoop(node,res) s1 = res.add('loop', 'pre_test' => 'true') generate_for_list(node,s1) end |
#print_Loop(node, res) ⇒ Object
54 55 56 57 58 |
# File 'lib/cpee/processtransformation/cpee.rb', line 54 def print_Loop(node,res) s1 = res.add('loop', 'pre_test' => node.condition.join(' && ')) s1.attributes['language'] = node.condition_type unless node.condition_type.nil? generate_for_list(node,s1) end |