Class: Twitter::Place
- Inherits:
-
Base
- Object
- Base
- Twitter::Place
show all
- Defined in:
- lib/twitter/place.rb
Instance Attribute Summary
Attributes inherited from Base
#attrs
Instance Method Summary
collapse
Methods inherited from Base
#[], #initialize, lazy_attr_reader
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Method Details
#==(other) ⇒ Boolean
11
12
13
|
# File 'lib/twitter/place.rb', line 11
def ==(other)
super || (other.class == self.class && other.id == self.id)
end
|
16
17
18
|
# File 'lib/twitter/place.rb', line 16
def bounding_box
@bounding_box ||= Twitter::GeoFactory.new(@attrs['bounding_box']) unless @attrs['bounding_box'].nil?
end
|
#country_code ⇒ String
21
22
23
|
# File 'lib/twitter/place.rb', line 21
def country_code
@country_code ||= @attrs['country_code'] || @attrs['countryCode']
end
|
#parent_id ⇒ Integer
26
27
28
|
# File 'lib/twitter/place.rb', line 26
def parent_id
@parent_id ||= @attrs['parentid']
end
|
#place_type ⇒ String
31
32
33
|
# File 'lib/twitter/place.rb', line 31
def place_type
@place_type ||= @attrs['place_type'] || @attrs['placeType'] && @attrs['placeType']['name']
end
|