Method: Object#it

Defined in:
lib/shenanigans/object/it.rb

#itObject

An identity method that provides access to an object’s self.

[1,2,3,4,5,1,2,2,3].group_by(&:it)
#=> {1=>[1, 1], 2=>[2, 2, 2], 3=>[3, 3], 4=>[4], 5=>[5]}


6
7
8
# File 'lib/shenanigans/object/it.rb', line 6

def it
  self
end