Class: RetrieveCountResponse

Inherits:
Response show all
Defined in:
lib/refworks/retrieve/count/retrieve_count_response.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#body, #parsed_response, #process_time, #result_code, #result_msg, #result_msg_code

Instance Method Summary collapse

Constructor Details

#initialize(raw_response) ⇒ RetrieveCountResponse

Returns a new instance of RetrieveCountResponse.



5
6
7
8
9
10
11
12
13
14
# File 'lib/refworks/retrieve/count/retrieve_count_response.rb', line 5

def initialize(raw_response)
  super(raw_response)
  if result_code != "200"
    return
  end

  # If results returned, process the references and metadata

  @count = self.parsed_response["refworks"]["RWResult"]["RetrieveCount"]["count"]
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



3
4
5
# File 'lib/refworks/retrieve/count/retrieve_count_response.rb', line 3

def count
  @count
end