lib/the_help/service.rb in the_help-2.0.0 vs lib/the_help/service.rb in the_help-3.0.0

- old
+ new

@@ -198,9 +198,19 @@ self.value = value self.status = :error freeze end + def value! + raise TheHelp::NoResultError if pending? + + raise value if error? && value.is_a?(Exception) + + raise TheHelp::ResultError.new(value) if error? + + value + end + private attr_writer :status, :value end