Class: Horoscopes::Zodiacs
- Inherits:
-
Object
- Object
- Horoscopes::Zodiacs
- Defined in:
- lib/horoscopes/zodiacs.rb
Constant Summary collapse
- @@list =
[]
Instance Attribute Summary collapse
-
#birthday ⇒ Object
Returns the value of attribute birthday.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#reading ⇒ Object
Returns the value of attribute reading.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#birthday ⇒ Object
Returns the value of attribute birthday.
2 3 4 |
# File 'lib/horoscopes/zodiacs.rb', line 2 def birthday @birthday end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/horoscopes/zodiacs.rb', line 2 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
2 3 4 |
# File 'lib/horoscopes/zodiacs.rb', line 2 def number @number end |
#reading ⇒ Object
Returns the value of attribute reading.
2 3 4 |
# File 'lib/horoscopes/zodiacs.rb', line 2 def reading @reading end |
Class Method Details
.all ⇒ Object
5 6 7 |
# File 'lib/horoscopes/zodiacs.rb', line 5 def self.all @@list end |
.sort_by_name ⇒ Object
13 14 15 |
# File 'lib/horoscopes/zodiacs.rb', line 13 def self.sort_by_name @@list.sort_by {|sign| sign.name} end |
Instance Method Details
#save ⇒ Object
9 10 11 |
# File 'lib/horoscopes/zodiacs.rb', line 9 def save @@list << self end |