lib/factrey.rb in factrey-0.1.0 vs lib/factrey.rb in factrey-0.2.0
- old
+ new
@@ -35,10 +35,10 @@
def blueprint(blueprint = nil, ext: nil, dsl: DSL, &)
raise TypeError, "blueprint must be a Blueprint" if blueprint && !blueprint.is_a?(Blueprint)
raise TypeError, "dsl must be a subclass of DSL" unless dsl <= DSL
blueprint ||= Blueprint.new
- dsl.new(blueprint:, ext:).instance_exec(&) if block_given?
+ blueprint.define_result dsl.new(blueprint:, ext:).instance_exec(&) if block_given?
blueprint
end
end
end