Methods

Files

Tins::UniqBy

Public Instance Methods

uniq_by(&b) click to toggle source
# File lib/tins/uniq_by.rb, line 3
def uniq_by(&b)
  b ||= lambda { |x| x }
  inject({}) { |h, e| h[b[e]] ||= e; h }.values
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.