Class: Proc

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

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



30
31
32
# File 'lib/fancy_to_proc.rb', line 30

def &(other)
  proc { |*args| other.to_proc.call call(*args) }
end

#|(other) ⇒ Object



26
27
28
# File 'lib/fancy_to_proc.rb', line 26

def |(other)
  curry(2)[other]
end