Class: Twitter::Place
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#woeid ⇒ Object
(also: #woe_id)
readonly
Returns the value of attribute woeid.
Attributes inherited from Base
Instance Method Summary collapse
- #bounding_box ⇒ Twitter::Geo
- #country_code ⇒ String
- #id ⇒ Object
- #parent_id ⇒ Integer
- #place_type ⇒ String
Methods inherited from Identity
#==, fetch, #initialize, store
Methods inherited from Base
#[], attr_reader, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Twitter::Identity
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/twitter/place.rb', line 6 def attributes @attributes end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
6 7 8 |
# File 'lib/twitter/place.rb', line 6 def country @country end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
6 7 8 |
# File 'lib/twitter/place.rb', line 6 def full_name @full_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/twitter/place.rb', line 6 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/twitter/place.rb', line 6 def url @url end |
#woeid ⇒ Object (readonly) Also known as: woe_id
Returns the value of attribute woeid.
6 7 8 |
# File 'lib/twitter/place.rb', line 6 def woeid @woeid end |
Instance Method Details
#bounding_box ⇒ Twitter::Geo
10 11 12 |
# File 'lib/twitter/place.rb', line 10 def bounding_box @bounding_box ||= Twitter::GeoFactory.fetch_or_new(@attrs[:bounding_box]) end |
#country_code ⇒ String
15 16 17 |
# File 'lib/twitter/place.rb', line 15 def country_code @country_code ||= @attrs[:country_code] || @attrs[:countryCode] end |
#id ⇒ Object
29 30 31 |
# File 'lib/twitter/place.rb', line 29 def id @attrs[:id] || @attrs[:woeid] end |
#parent_id ⇒ Integer
20 21 22 |
# File 'lib/twitter/place.rb', line 20 def parent_id @parent_id ||= @attrs[:parentid] end |
#place_type ⇒ String
25 26 27 |
# File 'lib/twitter/place.rb', line 25 def place_type @place_type ||= @attrs[:place_type] || @attrs[:placeType] && @attrs[:placeType][:name] end |