Class: ManuscriptFileResponse
- Inherits:
-
ManuscriptResponse
- Object
- Response
- ManuscriptResponse
- ManuscriptFileResponse
- Defined in:
- lib/refworks/manuscript/file/manuscript_file_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#parsed_response ⇒ Object
readonly
Returns the value of attribute parsed_response.
-
#process_time ⇒ Object
readonly
Returns the value of attribute process_time.
-
#result_code ⇒ Object
readonly
Returns the value of attribute result_code.
-
#result_msg ⇒ Object
readonly
Returns the value of attribute result_msg.
Attributes inherited from Response
Instance Method Summary collapse
-
#initialize(raw_response) ⇒ ManuscriptFileResponse
constructor
A new instance of ManuscriptFileResponse.
Constructor Details
#initialize(raw_response) ⇒ ManuscriptFileResponse
Returns a new instance of ManuscriptFileResponse.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/refworks/manuscript/file/manuscript_file_response.rb', line 4 def initialize(raw_response) @result_code = raw_response.code @body = raw_response.body @parsed_response = nil if @result_code != 200 @result_code = raw_response.code @result_msg = raw_response.msg else @parsed_response = nil @result_msg = "File retrieved and stored in body attribute. Parsed response not applicable for file retrievals." end end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
2 3 4 |
# File 'lib/refworks/manuscript/file/manuscript_file_response.rb', line 2 def body @body end |
#parsed_response ⇒ Object (readonly)
Returns the value of attribute parsed_response.
2 3 4 |
# File 'lib/refworks/manuscript/file/manuscript_file_response.rb', line 2 def parsed_response @parsed_response end |
#process_time ⇒ Object (readonly)
Returns the value of attribute process_time.
2 3 4 |
# File 'lib/refworks/manuscript/file/manuscript_file_response.rb', line 2 def process_time @process_time end |
#result_code ⇒ Object (readonly)
Returns the value of attribute result_code.
2 3 4 |
# File 'lib/refworks/manuscript/file/manuscript_file_response.rb', line 2 def result_code @result_code end |
#result_msg ⇒ Object (readonly)
Returns the value of attribute result_msg.
2 3 4 |
# File 'lib/refworks/manuscript/file/manuscript_file_response.rb', line 2 def result_msg @result_msg end |