Class: Astronoby::Opposition
- Inherits:
-
Object
- Object
- Astronoby::Opposition
- Defined in:
- lib/astronoby/events/opposition.rb
Instance Attribute Summary collapse
-
#body ⇒ Astronoby::Body
readonly
The body in opposition with the Sun.
-
#instant ⇒ Astronoby::Instant
readonly
When the opposition occurs.
Instance Method Summary collapse
-
#initialize(instant:, body:) ⇒ Opposition
constructor
A new instance of Opposition.
Constructor Details
#initialize(instant:, body:) ⇒ Opposition
Returns a new instance of Opposition.
13 14 15 16 17 |
# File 'lib/astronoby/events/opposition.rb', line 13 def initialize(instant:, body:) @instant = instant @body = body freeze end |
Instance Attribute Details
#body ⇒ Astronoby::Body (readonly)
Returns the body in opposition with the Sun.
9 10 11 |
# File 'lib/astronoby/events/opposition.rb', line 9 def body @body end |
#instant ⇒ Astronoby::Instant (readonly)
Returns when the opposition occurs.
6 7 8 |
# File 'lib/astronoby/events/opposition.rb', line 6 def instant @instant end |