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.
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_equal, attr_reader, #attrs, #attrs_equal, 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.
5 6 7 |
# File 'lib/twitter/place.rb', line 5 def attributes @attributes end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
5 6 7 |
# File 'lib/twitter/place.rb', line 5 def country @country end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
5 6 7 |
# File 'lib/twitter/place.rb', line 5 def full_name @full_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/twitter/place.rb', line 5 def name @name end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/twitter/place.rb', line 5 def url @url end |
#woeid ⇒ Object (readonly) Also known as: woe_id
Returns the value of attribute woeid.
5 6 7 |
# File 'lib/twitter/place.rb', line 5 def woeid @woeid end |
Instance Method Details
#bounding_box ⇒ Twitter::Geo
9 10 11 |
# File 'lib/twitter/place.rb', line 9 def bounding_box @bounding_box ||= Twitter::GeoFactory.fetch_or_new(@attrs[:bounding_box]) end |
#country_code ⇒ String
14 15 16 |
# File 'lib/twitter/place.rb', line 14 def country_code @country_code ||= @attrs[:country_code] || @attrs[:countryCode] end |
#id ⇒ Object
28 29 30 |
# File 'lib/twitter/place.rb', line 28 def id @attrs[:id] || @attrs[:woeid] end |
#parent_id ⇒ Integer
19 20 21 |
# File 'lib/twitter/place.rb', line 19 def parent_id @parent_id ||= @attrs[:parentid] end |
#place_type ⇒ String
24 25 26 |
# File 'lib/twitter/place.rb', line 24 def place_type @place_type ||= @attrs[:place_type] || @attrs[:placeType] && @attrs[:placeType][:name] end |