Class: Proc

Inherits:
Object
  • Object
show all
Defined in:
lib/rubygoods/proc.rb

Instance Method Summary collapse

Instance Method Details

#a_call(*args) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/rubygoods/proc.rb', line 2

def a_call(*args)
  pl = self.arity
  arr = Array.new(pl, nil)
  arr.each_index do |i|
    arr[i] = args[i]
  end
  self.call(*arr)
end