Class: R43::Response
- Inherits:
-
Object
- Object
- R43::Response
- Defined in:
- lib/r43.rb
Instance Attribute Summary collapse
-
#cities ⇒ Object
readonly
Returns the value of attribute cities.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#goal ⇒ Object
readonly
Returns the value of attribute goal.
-
#goals ⇒ Object
readonly
Returns the value of attribute goals.
-
#has_object ⇒ Object
readonly
Returns the value of attribute has_object.
-
#max_in_page ⇒ Object
readonly
Returns the value of attribute max_in_page.
-
#next_offset ⇒ Object
readonly
Returns the value of attribute next_offset.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#people ⇒ Object
readonly
Returns the value of attribute people.
-
#person ⇒ Object
readonly
Returns the value of attribute person.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#total_available ⇒ Object
readonly
Returns the value of attribute total_available.
-
#xml ⇒ Object
readonly
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(service, query) ⇒ Response
constructor
A new instance of Response.
- #more ⇒ Object
Constructor Details
#initialize(service, query) ⇒ Response
Returns a new instance of Response.
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/r43.rb', line 509 def initialize(service, query) @service = service @query = query @has_object = false @objects = [] @entries = [] @people = [] @goals = [] @cities = [] @tags = [] @max_in_page = 0 @total_available = 0 @next_offset = 0 _from_xml(service.get_response(query)) end |
Instance Attribute Details
#cities ⇒ Object (readonly)
Returns the value of attribute cities.
504 505 506 |
# File 'lib/r43.rb', line 504 def cities @cities end |
#city ⇒ Object
Returns the value of attribute city.
504 505 506 |
# File 'lib/r43.rb', line 504 def city @city end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
504 505 506 |
# File 'lib/r43.rb', line 504 def entries @entries end |
#entry ⇒ Object
Returns the value of attribute entry.
504 505 506 |
# File 'lib/r43.rb', line 504 def entry @entry end |
#goal ⇒ Object
Returns the value of attribute goal.
504 505 506 |
# File 'lib/r43.rb', line 504 def goal @goal end |
#goals ⇒ Object (readonly)
Returns the value of attribute goals.
504 505 506 |
# File 'lib/r43.rb', line 504 def goals @goals end |
#has_object ⇒ Object (readonly)
Returns the value of attribute has_object.
504 505 506 |
# File 'lib/r43.rb', line 504 def has_object @has_object end |
#max_in_page ⇒ Object (readonly)
Returns the value of attribute max_in_page.
504 505 506 |
# File 'lib/r43.rb', line 504 def max_in_page @max_in_page end |
#next_offset ⇒ Object (readonly)
Returns the value of attribute next_offset.
504 505 506 |
# File 'lib/r43.rb', line 504 def next_offset @next_offset end |
#object ⇒ Object
Returns the value of attribute object.
504 505 506 |
# File 'lib/r43.rb', line 504 def object @object end |
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
504 505 506 |
# File 'lib/r43.rb', line 504 def objects @objects end |
#people ⇒ Object (readonly)
Returns the value of attribute people.
504 505 506 |
# File 'lib/r43.rb', line 504 def people @people end |
#person ⇒ Object
Returns the value of attribute person.
504 505 506 |
# File 'lib/r43.rb', line 504 def person @person end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
504 505 506 |
# File 'lib/r43.rb', line 504 def query @query end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
504 505 506 |
# File 'lib/r43.rb', line 504 def service @service end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
504 505 506 |
# File 'lib/r43.rb', line 504 def @tags end |
#total_available ⇒ Object (readonly)
Returns the value of attribute total_available.
504 505 506 |
# File 'lib/r43.rb', line 504 def total_available @total_available end |
#xml ⇒ Object (readonly)
Returns the value of attribute xml.
504 505 506 |
# File 'lib/r43.rb', line 504 def xml @xml end |
Instance Method Details
#more ⇒ Object
525 526 527 528 |
# File 'lib/r43.rb', line 525 def more() clear_arrays() _populate_collections_from_xml(service.get_response(query + "&offset=#{@next_offset}")) end |