Class: DTK::Network::Client::Response::ErrorResponse::Usage

Inherits:
DTK::Network::Client::Response::ErrorResponse show all
Defined in:
lib/client/response/response_types.rb

Instance Method Summary collapse

Methods inherited from DTK::Network::Client::Response

#notok?, wrap_as_response

Constructor Details

#initialize(hash_or_string = {}) ⇒ Usage

Returns a new instance of Usage.



28
29
30
31
# File 'lib/client/response/response_types.rb', line 28

def initialize(hash_or_string = {})
  hash = (hash_or_string.kind_of?(String) ? {'message' => hash_or_string} : hash_or_string)
  super({'code' => 'error'}.merge(hash))
end