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.3.179 lib/cpee/processtransformation/target.rb
cpee-1.3.178 lib/cpee/processtransformation/target.rb
cpee-1.3.177 lib/cpee/processtransformation/target.rb
cpee-1.3.176 lib/cpee/processtransformation/target.rb
cpee-1.3.175 lib/cpee/processtransformation/target.rb
cpee-1.3.174 lib/cpee/processtransformation/target.rb
cpee-1.3.173 lib/cpee/processtransformation/target.rb
cpee-1.3.172 lib/cpee/processtransformation/target.rb
cpee-1.3.171 lib/cpee/processtransformation/target.rb