lib/flows/result/ok.rb in flows-0.0.2 vs lib/flows/result/ok.rb in flows-0.1.0

- old
+ new

@@ -1,22 +1,22 @@ module Flows class Result # Wrapper for successful results class Ok < Result + attr_reader :unwrap + def initialize(data, status: :success, meta: {}) - super + @unwrap = data + @status = status + @meta = meta end def ok? true end def err? false - end - - def unwrap - @data end def error raise NoErrorError.new(@status, @data) end