Module: Enumerable

Included in:
CompositeCursor, Mongo::Cursor
Defined in:
lib/mongo_delegate/ext.rb

Instance Method Summary collapse

Instance Method Details

#uniq_by(&b) ⇒ Object



2
3
4
# File 'lib/mongo_delegate/ext.rb', line 2

def uniq_by(&b)
  group_by(&b).values.map { |x| x.first }
end