Sha256: 5a23c19158bbb7b953f82a0dc53cd42e609d4cc38630774fdde0b89680c38523

Contents?: true

Size: 1.12 KB

Versions: 109

Compression:

Stored size: 1.12 KB

Contents

# encoding: UTF-8
#
# This file is part of CPEE.
#
# Apache License, Version 2.0
#
# Copyright (c) 2013 Juergen Mangler
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

module CPEE

  module ProcessTransformation

    module Target

      class Default
        def initialize(tree)
          @tree = tree
        end

        def output_to_document(doc)
          generate_for_list(@tree,doc.root)
          doc.to_s
        end  

        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

      end

    end

  end

end

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
cpee-1.5.27 lib/cpee/processtransformation/target.rb
cpee-1.5.26 lib/cpee/processtransformation/target.rb
cpee-1.5.25 lib/cpee/processtransformation/target.rb
cpee-1.5.24 lib/cpee/processtransformation/target.rb
cpee-1.5.23 lib/cpee/processtransformation/target.rb
cpee-1.5.22 lib/cpee/processtransformation/target.rb
cpee-1.5.21 lib/cpee/processtransformation/target.rb
cpee-1.5.20 lib/cpee/processtransformation/target.rb
cpee-1.5.19 lib/cpee/processtransformation/target.rb
cpee-1.5.18 lib/cpee/processtransformation/target.rb
cpee-1.5.17 lib/cpee/processtransformation/target.rb
cpee-1.5.16 lib/cpee/processtransformation/target.rb
cpee-1.5.15 lib/cpee/processtransformation/target.rb
cpee-1.5.13 lib/cpee/processtransformation/target.rb
cpee-1.5.12 lib/cpee/processtransformation/target.rb
cpee-1.5.11 lib/cpee/processtransformation/target.rb
cpee-1.5.10 lib/cpee/processtransformation/target.rb
cpee-1.5.9 lib/cpee/processtransformation/target.rb
cpee-1.5.8 lib/cpee/processtransformation/target.rb
cpee-1.5.7 lib/cpee/processtransformation/target.rb