Class: DemoApiScalarGalaxy::Models::Satellite::Orbit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/amritk-galaxy-staging/models/satellite.rb,
sig/amritk-galaxy-staging/models/satellite.rbs

Overview

See Also:

  • DemoApiScalarGalaxy::Models::Satellite#orbit

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(distance: nil, orbital_period: nil, planet_id: nil) ⇒ Object

Parameters:

  • distance (Float) (defaults to: nil) —

    Average distance from the planet in kilometers

  • orbital_period (Float) (defaults to: nil) —

    Orbital period in Earth days

  • planet_id (Integer) (defaults to: nil) —

    The ID of the planet this satellite orbits



# File 'lib/amritk-galaxy-staging/models/satellite.rb', line 87

Instance Attribute Details

#distance ⇒ Float?

Average distance from the planet in kilometers

Parameters:

  • (Float)

Returns:

  • (Float, nil)


73
# File 'lib/amritk-galaxy-staging/models/satellite.rb', line 73

optional :distance, Float

#orbital_period ⇒ Float?

Orbital period in Earth days

Parameters:

  • (Float)

Returns:

  • (Float, nil)


79
# File 'lib/amritk-galaxy-staging/models/satellite.rb', line 79

optional :orbital_period, Float, api_name: :orbitalPeriod

#planet_id ⇒ Integer?

The ID of the planet this satellite orbits

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


85
# File 'lib/amritk-galaxy-staging/models/satellite.rb', line 85

optional :planet_id, Integer, api_name: :planetId

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


87
# File 'sig/amritk-galaxy-staging/models/satellite.rbs', line 87

def to_hash: -> {