class LibTAD::Astronomy::AstronomyLocation

Information about location and astronomical objects requested.

Attributes

geo[R]

@return [GeoType] Geographical information about the location.

id[R]

@return [String] The id of the location.

matchparam[R]

@return [String] The part of the queried placeid that this location matches.

objects[R]

@return [Array<AstronomyObjectDetails>] Requested astronomical information.

Public Class Methods

new(hash) click to toggle source
# File lib/types/astronomy/astronomy_location.rb, line 21
def initialize(hash)
  @id = hash.fetch('id', nil)
  @matchparam = hash.fetch('matchparam', nil)
  @geo = ::LibTAD::Places::Geo.new hash.fetch('geo', nil)
  @objects = hash.fetch('astronomy', nil)
    &.fetch('objects', nil)
    &.map { |e| AstronomyObjectDetails.new(e) }
end