Class: Cloopen::REST::Response
- Inherits:
-
Object
- Object
- Cloopen::REST::Response
- Defined in:
- lib/cloopen/rest/response.rb
Constant Summary collapse
- STATUS_CODE_DESCRIPTIONS =
YAML.load_file(File.('../../../../conf/status_code_descriptions.yml', __FILE__))
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(body) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(body) ⇒ Response
Returns a new instance of Response.
7 8 9 10 11 |
# File 'lib/cloopen/rest/response.rb', line 7 def initialize(body) @body = body @status_code = @body.delete(:status_code) @status = status_code_descritptions[@status_code] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/cloopen/rest/response.rb', line 6 def body @body end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/cloopen/rest/response.rb', line 6 def status @status end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
6 7 8 |
# File 'lib/cloopen/rest/response.rb', line 6 def status_code @status_code end |