lib/latinum/collection.rb in latinum-1.1.0 vs lib/latinum/collection.rb in latinum-1.2.0
- old
+ new
@@ -22,9 +22,11 @@
require 'set'
module Latinum
# Aggregates a set of resources, typically used for summing values.
class Collection
+ include Enumerable
+
# Initialize the collection with a given set of resource names.
def initialize(names = Set.new)
@names = names
@resources = Hash.new {|hash, key| @names << key; BigDecimal.new("0")}
end