Class: Astronoby::Constellation
- Inherits:
-
Object
- Object
- Astronoby::Constellation
- Defined in:
- lib/astronoby/constellation.rb
Overview
Represents an IAU constellation with its full name and standard three-letter abbreviation.
Instance Attribute Summary collapse
-
#abbreviation ⇒ String
readonly
The IAU three-letter abbreviation (e.g., “Ori”).
-
#name ⇒ String
readonly
The constellation name (e.g., “Orion”).
Instance Method Summary collapse
-
#initialize(name, abbreviation) ⇒ Constellation
constructor
A new instance of Constellation.
Constructor Details
#initialize(name, abbreviation) ⇒ Constellation
Returns a new instance of Constellation.
15 16 17 18 |
# File 'lib/astronoby/constellation.rb', line 15 def initialize(name, abbreviation) @name = name @abbreviation = abbreviation end |
Instance Attribute Details
#abbreviation ⇒ String (readonly)
Returns the IAU three-letter abbreviation (e.g., “Ori”).
11 12 13 |
# File 'lib/astronoby/constellation.rb', line 11 def abbreviation @abbreviation end |
#name ⇒ String (readonly)
Returns the constellation name (e.g., “Orion”).
8 9 10 |
# File 'lib/astronoby/constellation.rb', line 8 def name @name end |