class DTK::Network::Client::Response
Public Class Methods
new(hash = {})
click to toggle source
Calls superclass method
# File lib/client/response.rb, line 7 def initialize(hash = {}) super(hash) end
wrap_as_response(data = {}) { |: data)| ... }
click to toggle source
# File lib/client/response.rb, line 15 def self.wrap_as_response(data = {}, &block) results = (block ? yield : data) if results.nil? NoOp.new elsif results.kind_of?(Response) results else Ok.new(results) end end
Public Instance Methods
notok?()
click to toggle source
# File lib/client/response.rb, line 11 def notok? kind_of?(NotOk) end