Class: Tweetkit::Response::Tweets::Tweet::Geo::Coordinates

Inherits:
Object
  • Object
show all
Defined in:
lib/tweetkit/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(coordinates) ⇒ Coordinates

Returns a new instance of Coordinates.



375
376
377
378
# File 'lib/tweetkit/response.rb', line 375

def initialize(coordinates)
  @coordinates = coordinates['coordinates']
  @type = coordinates['point']
end

Instance Attribute Details

#coordinatesObject

Returns the value of attribute coordinates.



373
374
375
# File 'lib/tweetkit/response.rb', line 373

def coordinates
  @coordinates
end

#typeObject

Returns the value of attribute type.



373
374
375
# File 'lib/tweetkit/response.rb', line 373

def type
  @type
end

Instance Method Details

#xObject



380
381
382
# File 'lib/tweetkit/response.rb', line 380

def x
  coordinates[0]
end

#yObject



384
385
386
# File 'lib/tweetkit/response.rb', line 384

def y
  coordinates[0]
end