Sha256: ad31430dee504039197b6313482589b6dd9efd2e1263a4dfd9277c19958c7e2f
Contents?: true
Size: 262 Bytes
Versions: 2
Compression:
Stored size: 262 Bytes
Contents
module Streamer module Functors # least determines the least item in a list class Least < Functor def call vals = list.map do |item| item[options.fetch(:property)] end vals.sort.shift end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
streamer-0.2.1 | lib/streamer/functors/least.rb |
streamer-0.2.0 | lib/streamer/functors/least.rb |