lib/atacama/contract.rb in atacama-0.1.5 vs lib/atacama/contract.rb in atacama-0.1.6

- old
+ new

@@ -48,11 +48,11 @@ define_method(name) { @context[name] } define_method("#{name}?") { !!@context[name] } end - def call(context = {}) - new(context: context).call.tap do |result| + def call(context = {}, &block) + new(context: context).call(&block).tap do |result| validate_return(result) end end def inject(injected)