Module: IronWorkerNG::Feature::Ruby::MergeExec::InstanceMethods

Included in:
Code::Ruby
Defined in:
lib/iron_worker_ng/feature/ruby/merge_exec.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



48
49
50
# File 'lib/iron_worker_ng/feature/ruby/merge_exec.rb', line 48

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

Instance Method Details

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



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

def merge_exec(path, klass = nil)
  @exec ||= nil 

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

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

  IronCore::Logger.info 'IronWorkerNG', "Merging ruby exec with path='#{path}' and class='#{klass}'"

  @features << @exec
end