Class: DemoApiScalarGalaxy::Models::Satellite

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

Defined Under Namespace

Modules: Type Classes: Orbit

Instance Attribute Summary collapse

Class Method 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(name:, type:, id: nil, description: nil, diameter: nil, orbit: nil) ⇒ Object

Every satellite in the Scalar Galaxy

Parameters:



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

Instance Attribute Details

#description ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :description, String, nil?: true

#diameter ⇒ Float?

Diameter in kilometers

Parameters:

  • (Float)

Returns:

  • (Float, nil)


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

optional :diameter, Float

#id ⇒ Integer? (readonly)

Returns the value of attribute id.

Returns:

  • (Integer, nil)


18
19
20
# File 'sig/amritk-galaxy-staging/models/satellite.rbs', line 18

def id
  @id
end

#name ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

#orbit ⇒ DemoApiScalarGalaxy::Models::Satellite::Orbit?



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

optional :orbit, -> { DemoApiScalarGalaxy::Satellite::Orbit }

#type ⇒ Symbol, DemoApiScalarGalaxy::Models::Satellite::Type

Parameters:

  • value (DemoApiScalarGalaxy::Models::Satellite::type_)

Returns:



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

required :type, enum: -> { DemoApiScalarGalaxy::Satellite::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#id= ⇒ Integer (readonly)

Parameters:

  • (Integer)

Returns:

  • (Integer)


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

def id=: (Integer) -> Integer

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {