Class: ArchivesSpace::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/archivesspace/client/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
11
12
13
14
# File 'lib/archivesspace/client/response.rb', line 6

def initialize(result)
  # throw error
  @result      = result
  @parsed      = result.parsed_response
  @body        = result.body
  @headers     = result.headers
  @status      = result.response
  @status_code = result.code.to_i
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def headers
  @headers
end

#parsedObject (readonly)

Returns the value of attribute parsed.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def parsed
  @parsed
end

#resultObject (readonly)

Returns the value of attribute result.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def result
  @result
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def status
  @status
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def status_code
  @status_code
end

#xmlObject (readonly)

Returns the value of attribute xml.



4
5
6
# File 'lib/archivesspace/client/response.rb', line 4

def xml
  @xml
end