Class: Twitter::Location

Inherits:
Object
  • Object
show all
Includes:
ModelMixin
Defined in:
lib/twitter/model.rb

Overview

Represents a location in Twitter

Constant Summary collapse

@@ATTRIBUTES =
[:name, :woeid, :country, :url, :countryCode, :parentid, :placeType]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ModelMixin

included

Class Method Details

.attributesObject



166
# File 'lib/twitter/model.rb', line 166

def attributes; @@ATTRIBUTES; end

Instance Method Details

#country_codeObject

Alias to countryCode for those wanting to use consistent naming convention for attribute



171
172
173
# File 'lib/twitter/model.rb', line 171

def country_code
  @countryCode
end

#inspectObject

Convenience method to output meaningful representation to STDOUT as per Ruby convention



189
190
191
# File 'lib/twitter/model.rb', line 189

def inspect
  "#{name} / #{woeid} / #{countryCode}\n#{url}\n"
end

#parent_idObject

Alias to parentid for those wanting to use consistent naming convention for attribute



177
178
179
# File 'lib/twitter/model.rb', line 177

def parent_id
  @parentid
end

#place_typeObject

Alias to placeType for those wanting to use consistent naming convention for attribute



183
184
185
# File 'lib/twitter/model.rb', line 183

def place_type
  @place_type
end