Class: MapRedus::Support::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/mapredus/support.rb

Instance Method Summary collapse

Constructor Details

#initialize(class_name) ⇒ Runner

Returns a new instance of Runner.



7
8
9
# File 'lib/mapredus/support.rb', line 7

def initialize(class_name)
  @class = class_name
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/mapredus/support.rb', line 11

def method_missing(method, *args, &block)
  mr_process = "#{@class}_#{method.to_s}"
  if self.respond_to?(mr_process)
    self.send(mr_process, *args, &block)
  else
    super(method, *args, &block)  
  end
end