Class: Proc

Inherits:
Object
  • Object
show all
Defined in:
lib/yogo/operation.rb

Overview

Operation

Direct Known Subclasses

Yogo::Operation

Instance Method Summary collapse

Instance Method Details

#partial(*args) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/yogo/operation.rb', line 28

def partial(*args)
  Proc.new do |*spice|
    result = args.collect do |a|
      X == a ? spice.shift : a
    end
    call(*result)
  end
end