class LibTAD::Places::Region
The geographical region. Contains country, a textual description of the region and the name of the biggest place.
Attributes
biggestplace[R]
@return [String] Name of the biggest city within the region.
country[R]
@return [Country] Country
which the region belongs to.
desc[R]
@return [String] Textual description of a region.
Example: All locations Example: most of Newfoundland and Labrador Example: some regions of Nunavut Territory; small region of Ontario
locations[R]
@return [Array<LocationRef>] A list of all locations referenced by this region. Only returned if requested by specifying the parameter listplaces.
Public Class Methods
new(hash)
click to toggle source
# File lib/types/places/region.rb, line 26 def initialize(hash) @country = Country.new hash['country'] unless !hash.key?('country') @desc = hash.fetch('desc', nil) @biggestplace = hash.fetch('biggestplace', nil) @locations = hash.fetch('locations', nil) &.map { |e| LocationRef.new(e) } end