lib/casting/enum.rb in casting-1.0.1 vs lib/casting/enum.rb in casting-1.0.2
- old
+ new
@@ -1,8 +1,10 @@
module Casting
module Enum
+ extend self
+
def enum(collection, *behaviors)
- enum = Enumerator.new do |yielder|
+ Enumerator.new do |yielder|
collection.each do |item|
yielder.yield(item.cast_as(*behaviors))
end
end
end