Class: Twitter::GeoResults
- Inherits:
-
Object
- Object
- Twitter::GeoResults
- Includes:
- Enumerable, Utils
- Defined in:
- lib/twitter/geo_results.rb
Instance Attribute Summary collapse
- #attrs ⇒ Hash (also: #to_h) readonly
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Twitter::GeoResults
constructor
Initializes a new GeoResults object.
- #token ⇒ String
Methods included from Utils
Methods included from Enumerable
Constructor Details
#initialize(attrs = {}) ⇒ Twitter::GeoResults
Initializes a new GeoResults object
17 18 19 20 21 22 |
# File 'lib/twitter/geo_results.rb', line 17 def initialize(attrs = {}) @attrs = attrs @collection = @attrs[:result].fetch(:places, []).collect do |place| Place.new(place) end end |
Instance Attribute Details
#attrs ⇒ Hash (readonly) Also known as: to_h
9 10 11 |
# File 'lib/twitter/geo_results.rb', line 9 def attrs @attrs end |
Instance Method Details
#token ⇒ String
25 26 27 |
# File 'lib/twitter/geo_results.rb', line 25 def token @attrs[:token] end |