lib/the_help/service.rb in the_help-1.2.2 vs lib/the_help/service.rb in the_help-1.3.0
- old
+ new
@@ -196,17 +196,18 @@
validate_service_definition
catch(:stop) do
authorize
log_service_call
main
- yield result if block_given?
+ self.block_result = yield result if block_given?
end
+ return block_result if block_given?
self
end
private
- attr_accessor :context, :logger, :not_authorized, :result_handler
+ attr_accessor :context, :logger, :not_authorized, :block_result
attr_writer :result
attr_reader :inputs
alias service_context context
alias service_logger logger