Class: LibTAD::Places::Place

Inherits:
Object
  • Object
show all
Defined in:
lib/types/places/place.rb

Overview

Information about a place.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Place

Returns a new instance of Place.



17
18
19
20
21
# File 'lib/types/places/place.rb', line 17

def initialize(hash)
  @id = hash.fetch('id', nil)
  @urlid = hash.fetch('urlid', nil)
  @geo = Geo.new hash['geo'] unless !hash.key?('geo')
end

Instance Attribute Details

#geoGeo (readonly)

Geographical information about the location.

Returns:



15
16
17
# File 'lib/types/places/place.rb', line 15

def geo
  @geo
end

#idString (readonly)

Numerical ID of the referenced place.

Returns:

  • (String)


7
8
9
# File 'lib/types/places/place.rb', line 7

def id
  @id
end

#urlidString (readonly)

Textual ID of the referenced place.

Returns:

  • (String)


11
12
13
# File 'lib/types/places/place.rb', line 11

def urlid
  @urlid
end