lib/pwush/response.rb in pwush-0.1.4 vs lib/pwush/response.rb in pwush-0.1.5
- old
+ new
@@ -1,17 +1,16 @@
-require 'dry-monads'
+require 'dry/monads/result'
require 'pwush/response/deffered'
require 'pwush/response/value'
module Pwush
module Response
+ include Dry::Monads::Result::Mixin
+
def self.wrap
Deffered.new(yield).resolve
rescue Http::TimeoutError => e
Failure.new(e)
end
-
- class Success < Dry::Monads::Success; end
- class Failure < Dry::Monads::Failure; end
end
end