class PBatcher::ProcHandler

Attributes

method[R]

Public Class Methods

new(generator, method = nil, &block) click to toggle source
Calls superclass method PBatcher::Handler::new
# File lib/pbatcher/proc_handler.rb, line 5
def initialize(generator, method = nil, &block)
  super(generator)
  method = method ? method : block
  raise ArgumentError, 'Namer is not a proc' unless method.is_a? Proc
  @method = method || block
end

Public Instance Methods

call(*args) click to toggle source
# File lib/pbatcher/proc_handler.rb, line 12
def call(*args)
  method.call(*args)
end