lib/rom/factory/dsl.rb in rom-factory-0.5.0 vs lib/rom/factory/dsl.rb in rom-factory-0.6.0

- old
+ new

@@ -37,11 +37,11 @@ yield(self) end # @api private def call - ::ROM::Factory::Builder.new(_attributes, _relation) + ::ROM::Factory::Builder.new(_attributes, relation: _relation) end # Delegate to a builder and persist a struct # # @param [Symbol] The name of the registered builder @@ -136,16 +136,16 @@ _valid_names.include?(meth) || super end # @api private def define_sequence(name, block) - _attributes << attributes::Callable.new(name, self, &attributes::Sequence.new(name, &block)) + _attributes << attributes::Callable.new(name, self, attributes::Sequence.new(name, &block)) end # @api private def define_attr(name, *args, &block) if block - _attributes << attributes::Callable.new(name, self, &block) + _attributes << attributes::Callable.new(name, self, block) else _attributes << attributes::Value.new(name, *args) end end