Class/Module Index [+]

Quicksearch

Twitter::Place

Attributes

attributes[R]
country[R]
full_name[R]
name[R]

Public Class Methods

new(attrs = {}) click to toggle source

Initializes a new place

@param attrs [Hash] @raise [ArgumentError] Error raised when supplied argument is missing a :woeid key. @return [Twitter::Place]

# File lib/twitter/place.rb, line 19
def initialize(attrs = {})
  attrs[:id] ||= attrs.fetch(:woeid)
  super
end

Public Instance Methods

country_code() click to toggle source

@return [String]

# File lib/twitter/place.rb, line 25
def country_code
  @attrs[:country_code] || @attrs[:countryCode] # rubocop:disable SymbolName
end
parent_id() click to toggle source

@return [Integer]

# File lib/twitter/place.rb, line 31
def parent_id
  @attrs[:parentid]
end
place_type() click to toggle source

@return [String]

# File lib/twitter/place.rb, line 37
def place_type
  @attrs[:place_type] || @attrs[:placeType] && @attrs[:placeType][:name] # rubocop:disable SymbolName
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.