Class: CPEE::ProcessTransformation::Target::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/cpee/processtransformation/target.rb

Direct Known Subclasses

CPEE

Instance Method Summary collapse

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