Sha256: d151e1207efc87b314515792ea41e8482ecf66a5ba9e1aacc9c9bf03ff2a0a63

Contents?: true

Size: 593 Bytes

Versions: 14

Compression:

Stored size: 593 Bytes

Contents

require_relative 'executed_after_children'

module DeepCover
  module Node::Mixin
    module CheckCompletion
      def check_completion(outer:'(%{node})', inner:'(%{node})')
        has_tracker :completion
        include ExecutedAfterChildren
        alias_method :flow_completion_count, :completion_tracker_hits
        pre, post = outer.split('%{node}')
        # The local=local is to avoid Ruby warning about "Possible use of value in void context"
        define_method(:rewrite) { "#{pre}(%{local}=#{inner};%{completion_tracker};%{local}=%{local})#{post}" }
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
deep-cover-0.1.14 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.13 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.12 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.11 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.10 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.9 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.8 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.7 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.6 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.5 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.4 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.3 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.2 lib/deep_cover/node/mixin/check_completion.rb
deep-cover-0.1.1 lib/deep_cover/node/mixin/check_completion.rb