Class: ManuscriptFileResponse

Inherits:
ManuscriptResponse show all
Defined in:
lib/refworks/manuscript/file/manuscript_file_response.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#result_msg_code

Instance Method Summary collapse

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

#bodyObject (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_responseObject (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_timeObject (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_codeObject (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_msgObject (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