class LibTAD::Astronomy::AstronomyObjectDetails
Information about an astronomy object.
Attributes
current[R]
@return [AstronomyCurrent] The current data for the object. Only if requested.
days[R]
@return [Array<AstronomyDay>] Lists and wraps all requested days where events are happening.
name[R]
@return [String] Object name.
results[R]
@return [Array<AstronomyCurrent>] The specific data for the object at isotime/utctime.
Public Class Methods
new(hash)
click to toggle source
# File lib/types/astronomy/astronomy_object_details.rb, line 21 def initialize(hash) @name = hash.fetch('name', nil) @days = hash.fetch('days', nil) &.map { |e| AstronomyDay.new(e) } @current = AstronomyCurrent.new hash['current'] unless !hash.key?('current') @results = hash.fetch('results', nil) &.map { |e| AstronomyCurrent.new(e) } end