lib/flows/result/ok.rb in flows-0.0.1 vs lib/flows/result/ok.rb in flows-0.0.2
- old
+ new
@@ -1,11 +1,9 @@
module Flows
class Result
# Wrapper for successful results
class Ok < Result
- class NoErrorError < Flows::Error; end
-
def initialize(data, status: :success, meta: {})
super
end
def ok?
@@ -19,10 +17,10 @@
def unwrap
@data
end
def error
- raise NoErrorError
+ raise NoErrorError.new(@status, @data)
end
end
end
end