Sha256: 455c6084c40005f68edd6377f1cdc923573441142582841bcd21f49346c1cd68

Contents?: true

Size: 849 Bytes

Versions: 9

Compression:

Stored size: 849 Bytes

Contents

module Pione
  module RuleEngine
    # RootHandler is a special handler for RootRule.
    class RootHandler < FlowHandler
      def execute
        # import initial input tuples from input domain
        @inputs.flatten.each {|input| copy_data_into_domain(input, @domain_id)}
        # execute the rule
        outputs = super
        # export outputs to output domain
        outputs.flatten.each {|output| copy_data_into_domain(output, '/output')}
        # substantiate symbolic links
        # substantiate_date

        return outputs
      end

      # Substantiate symbolic links to files.
      def substantiate_date
        @outputs.flatten.compact.each do |output|
          if output.location.cached? and output.link?
            FileCache.get(output.location).turn(output.location)
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pione-0.5.0 lib/pione/rule-engine/root-handler.rb
pione-0.5.0.alpha.2 lib/pione/rule-engine/root-handler.rb
pione-0.5.0.alpha.1 lib/pione/rule-engine/root-handler.rb
pione-0.4.2 lib/pione/rule-engine/root-handler.rb
pione-0.4.1 lib/pione/rule-engine/root-handler.rb
pione-0.4.0 lib/pione/rule-engine/root-handler.rb
pione-0.3.2 lib/pione/rule-engine/root-handler.rb
pione-0.3.1 lib/pione/rule-engine/root-handler.rb
pione-0.3.0 lib/pione/rule-engine/root-handler.rb