Class: PropertiesFieldlabelsResponse
- Inherits:
-
PropertiesResponse
- Object
- Response
- PropertiesResponse
- PropertiesFieldlabelsResponse
- Defined in:
- lib/refworks/properties/fieldlabels/properties_fieldlabels_response.rb
Instance Attribute Summary collapse
-
#reftypes ⇒ Object
readonly
Returns the value of attribute reftypes.
Attributes inherited from Response
#body, #parsed_response, #process_time, #result_code, #result_msg, #result_msg_code
Instance Method Summary collapse
-
#initialize(raw_response) ⇒ PropertiesFieldlabelsResponse
constructor
A new instance of PropertiesFieldlabelsResponse.
Constructor Details
#initialize(raw_response) ⇒ PropertiesFieldlabelsResponse
Returns a new instance of PropertiesFieldlabelsResponse.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/refworks/properties/fieldlabels/properties_fieldlabels_response.rb', line 4 def initialize(raw_response) super(raw_response) if result_code != "200" @total = "0" return end # If results returned, process the fieldlabels and metadata rts = self.parsed_response["refworks"]["RWResult"]["PropertiesResult"]["reference"] @reftypes = Array.new rts.each do |rt| @reftypes << ReftypeFieldlabels.new(rt) end end |
Instance Attribute Details
#reftypes ⇒ Object (readonly)
Returns the value of attribute reftypes.
2 3 4 |
# File 'lib/refworks/properties/fieldlabels/properties_fieldlabels_response.rb', line 2 def reftypes @reftypes end |