Class: DTK::Network::Client::Response::ErrorResponse::Usage
- Inherits:
-
DTK::Network::Client::Response::ErrorResponse
- Object
- Common::Response
- DTK::Network::Client::Response
- DTK::Network::Client::Response::ErrorResponse
- DTK::Network::Client::Response::ErrorResponse::Usage
- Defined in:
- lib/client/response/response_types.rb
Instance Method Summary collapse
-
#initialize(hash_or_string = {}) ⇒ Usage
constructor
A new instance of Usage.
Methods inherited from DTK::Network::Client::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 |