Module: IronWorkerNG::Feature::Node::MergeExec::InstanceMethods

Included in:
Code::Node
Defined in:
lib/iron_worker_ng/feature/node/merge_exec.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



46
47
48
# File 'lib/iron_worker_ng/feature/node/merge_exec.rb', line 46

def self.included(base)
  IronWorkerNG::Code::Base.register_feature(:name => 'merge_exec', :for_klass => base, :args => 'PATH')
end

Instance Method Details

#merge_exec(path) ⇒ Object Also known as: exec, merge_worker



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/iron_worker_ng/feature/node/merge_exec.rb', line 26

def merge_exec(path)
  @exec ||= nil 

  unless @exec.nil?
    IronCore::Logger.warn 'IronWorkerNG', "Ignoring attempt to merge node exec with path='#{path}'"
    return
  end

  @exec = IronWorkerNG::Feature::Node::MergeExec::Feature.new(self, path)

  IronCore::Logger.info 'IronWorkerNG', "Merging node exec with path='#{path}'"

  @features << @exec
end