Class: CPEE::ProcessTransformation::Target::Default
- Inherits:
-
Object
- Object
- CPEE::ProcessTransformation::Target::Default
- Defined in:
- lib/cpee/processtransformation/target.rb
Direct Known Subclasses
Instance Method Summary collapse
- #generate_for_list(list, res) ⇒ Object
-
#initialize(tree) ⇒ Default
constructor
A new instance of Default.
- #output_to_document(doc) ⇒ Object
Constructor Details
#initialize(tree) ⇒ Default
Returns a new instance of Default.
28 29 30 |
# File 'lib/cpee/processtransformation/target.rb', line 28 def initialize(tree) @tree = tree end |
Instance Method Details
#generate_for_list(list, res) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/cpee/processtransformation/target.rb', line 37 def generate_for_list(list,res) list.each do |e| nam = e.class.name.gsub(/\w+:+/,'') send("print_#{nam}".to_sym,e,res) end end |
#output_to_document(doc) ⇒ Object
32 33 34 35 |
# File 'lib/cpee/processtransformation/target.rb', line 32 def output_to_document(doc) generate_for_list(@tree,doc.root) doc.to_s end |