lib/meibo/data_set.rb in meibo-0.3.0 vs lib/meibo/data_set.rb in meibo-0.4.0
- old
+ new
@@ -1,7 +1,9 @@
module Meibo
class DataSet
+ include Enumerable
+
attr_reader :roster
def initialize(data, roster:)
@data = data
@data_hash = data.to_h {|datum| [datum.sourced_id, datum] }
@@ -36,12 +38,8 @@
def find(sourced_id)
@data_hash.fetch(sourced_id)
rescue KeyError
raise DataNotFoundError, "sourcedId: #{sourced_id} が見つかりません"
- end
-
- def to_a
- @data
end
end
end