Sha256: 6b2111202f8502e40d41b3b7f6d3f07ac46ad9651b2cc32aaa4b5b07cb78054e
Contents?: true
Size: 241 Bytes
Versions: 1
Compression:
Stored size: 241 Bytes
Contents
module Casting module Enum extend self def enum(collection, *behaviors) Enumerator.new do |yielder| collection.each do |item| yielder.yield(item.cast_as(*behaviors)) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
casting-1.0.2 | lib/casting/enum.rb |