Class: Proc

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

Class Method Summary collapse

Class Method Details

.identityObject



3
4
5
# File 'lib/forwarder/helpers.rb', line 3

def identity
  new{ |x| x }
end

.sumObject



6
7
8
# File 'lib/forwarder/helpers.rb', line 6

def sum
  new{ |a,b| a+b }
end