lib/rom/relation.rb in rom-0.9.0.rc1 vs lib/rom/relation.rb in rom-0.9.0

- old
+ new

@@ -17,11 +17,11 @@ # forwards every method to the dataset, which is why the "native" interface of # the underlying gateway is available in the relation. This interface, # however, is considered private and should not be used outside of the # relation instance. # - # ROM builds sub-classes of this class for every relation defined in the + # ROM builds sub-classes of this class for every relation defined in the # environment for easy inspection and extensibility - every gateway can # provide extensions for those sub-classes but there is always a vanilla # relation instance stored in the schema registry. # # @api public @@ -45,11 +45,11 @@ # # @api private attr_reader :dataset # @api private - def initialize(dataset, options = {}) + def initialize(dataset, options = EMPTY_HASH) @dataset = dataset super end # Yield dataset tuples @@ -113,10 +113,10 @@ end private # @api private - def __new__(dataset, new_opts = {}) + def __new__(dataset, new_opts = EMPTY_HASH) self.class.new(dataset, options.merge(new_opts)) end end end