Class: Accuweather::Conditions::Planets
- Inherits:
-
Object
- Object
- Accuweather::Conditions::Planets
- Defined in:
- lib/accuweather/conditions/planets.rb
Instance Attribute Summary collapse
-
#jupiterrise ⇒ Object
readonly
Returns the value of attribute jupiterrise.
-
#jupiterset ⇒ Object
readonly
Returns the value of attribute jupiterset.
-
#marsrise ⇒ Object
readonly
Returns the value of attribute marsrise.
-
#marsset ⇒ Object
readonly
Returns the value of attribute marsset.
-
#mercuryrise ⇒ Object
readonly
Returns the value of attribute mercuryrise.
-
#mercuryset ⇒ Object
readonly
Returns the value of attribute mercuryset.
-
#moonrise ⇒ Object
readonly
Returns the value of attribute moonrise.
-
#moonset ⇒ Object
readonly
Returns the value of attribute moonset.
-
#neptunerise ⇒ Object
readonly
Returns the value of attribute neptunerise.
-
#neptuneset ⇒ Object
readonly
Returns the value of attribute neptuneset.
-
#plutorise ⇒ Object
readonly
Returns the value of attribute plutorise.
-
#plutoset ⇒ Object
readonly
Returns the value of attribute plutoset.
-
#saturnrise ⇒ Object
readonly
Returns the value of attribute saturnrise.
-
#saturnset ⇒ Object
readonly
Returns the value of attribute saturnset.
-
#sunrise ⇒ Object
readonly
Returns the value of attribute sunrise.
-
#sunset ⇒ Object
readonly
Returns the value of attribute sunset.
-
#uranusrise ⇒ Object
readonly
Returns the value of attribute uranusrise.
-
#uranusset ⇒ Object
readonly
Returns the value of attribute uranusset.
-
#venusrise ⇒ Object
readonly
Returns the value of attribute venusrise.
-
#venusset ⇒ Object
readonly
Returns the value of attribute venusset.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(sunrise:, sunset:, moonrise:, moonset:, mercuryrise:, mercuryset:, venusrise:, venusset:, marsrise:, marsset:, jupiterrise:, jupiterset:, saturnrise:, saturnset:, uranusrise:, uranusset:, neptunerise:, neptuneset:, plutorise:, plutoset:) ⇒ Planets
constructor
A new instance of Planets.
- #to_s ⇒ Object
Constructor Details
#initialize(sunrise:, sunset:, moonrise:, moonset:, mercuryrise:, mercuryset:, venusrise:, venusset:, marsrise:, marsset:, jupiterrise:, jupiterset:, saturnrise:, saturnset:, uranusrise:, uranusset:, neptunerise:, neptuneset:, plutorise:, plutoset:) ⇒ Planets
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/accuweather/conditions/planets.rb', line 6 def initialize(sunrise:, sunset:, moonrise:, moonset:, mercuryrise:, mercuryset:, venusrise:, venusset:, marsrise:, marsset:, jupiterrise:, jupiterset:, saturnrise:, saturnset:, uranusrise:, uranusset:, neptunerise:, neptuneset:, plutorise:, plutoset:) @sunrise = sunrise @sunset = sunset @moonrise = moonrise @moonset = moonset @mercuryrise = mercuryrise @mercuryset = mercuryset @venusrise = venusrise @venusset = venusset @marsrise = marsrise @marsset = marsset @jupiterrise = jupiterrise @jupiterset = jupiterset @saturnrise = saturnrise @saturnset = saturnset @uranusrise = uranusrise @uranusset = uranusset @neptunerise = neptunerise @neptuneset = neptuneset @plutorise = plutorise @plutoset = plutoset end |
Instance Attribute Details
#jupiterrise ⇒ Object (readonly)
Returns the value of attribute jupiterrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def jupiterrise @jupiterrise end |
#jupiterset ⇒ Object (readonly)
Returns the value of attribute jupiterset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def jupiterset @jupiterset end |
#marsrise ⇒ Object (readonly)
Returns the value of attribute marsrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def marsrise @marsrise end |
#marsset ⇒ Object (readonly)
Returns the value of attribute marsset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def marsset @marsset end |
#mercuryrise ⇒ Object (readonly)
Returns the value of attribute mercuryrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def mercuryrise @mercuryrise end |
#mercuryset ⇒ Object (readonly)
Returns the value of attribute mercuryset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def mercuryset @mercuryset end |
#moonrise ⇒ Object (readonly)
Returns the value of attribute moonrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def moonrise @moonrise end |
#moonset ⇒ Object (readonly)
Returns the value of attribute moonset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def moonset @moonset end |
#neptunerise ⇒ Object (readonly)
Returns the value of attribute neptunerise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def neptunerise @neptunerise end |
#neptuneset ⇒ Object (readonly)
Returns the value of attribute neptuneset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def neptuneset @neptuneset end |
#plutorise ⇒ Object (readonly)
Returns the value of attribute plutorise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def plutorise @plutorise end |
#plutoset ⇒ Object (readonly)
Returns the value of attribute plutoset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def plutoset @plutoset end |
#saturnrise ⇒ Object (readonly)
Returns the value of attribute saturnrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def saturnrise @saturnrise end |
#saturnset ⇒ Object (readonly)
Returns the value of attribute saturnset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def saturnset @saturnset end |
#sunrise ⇒ Object (readonly)
Returns the value of attribute sunrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def sunrise @sunrise end |
#sunset ⇒ Object (readonly)
Returns the value of attribute sunset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def sunset @sunset end |
#uranusrise ⇒ Object (readonly)
Returns the value of attribute uranusrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def uranusrise @uranusrise end |
#uranusset ⇒ Object (readonly)
Returns the value of attribute uranusset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def uranusset @uranusset end |
#venusrise ⇒ Object (readonly)
Returns the value of attribute venusrise.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def venusrise @venusrise end |
#venusset ⇒ Object (readonly)
Returns the value of attribute venusset.
4 5 6 |
# File 'lib/accuweather/conditions/planets.rb', line 4 def venusset @venusset end |
Instance Method Details
#==(other) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/accuweather/conditions/planets.rb', line 29 def ==(other) sunrise == other.sunrise && sunset == other.sunset && moonrise == other.moonrise && moonset == other.moonset && mercuryrise == other.mercuryrise && mercuryset == other.mercuryset && venusrise == other.venusrise && venusset == other.venusset && marsrise == other.marsrise && marsset == other.marsset && jupiterrise == other.jupiterrise && jupiterset == other.jupiterset && saturnrise == other.saturnrise && saturnset == other.saturnset && uranusrise == other.uranusrise && uranusset == other.uranusset && neptunerise == other.neptunerise && neptuneset == other.neptuneset && plutorise == other.plutorise && plutoset == other.plutoset rescue NoMethodError false end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/accuweather/conditions/planets.rb', line 54 def to_s "sunrise: #{sunrise}, sunset: #{sunset}, moonrise: #{moonrise}, moonset: #{moonset}, mercuryrise: #{mercuryrise}, mercuryset: #{mercuryset}, venusrise: #{venusrise}, venusset: #{venusset}, marsrise: #{marsrise}, marsset: #{marsset}, jupiterrise: #{jupiterrise}, jupiterset: #{jupiterset}, saturnrise: #{saturnrise}, saturnset: #{saturnset}, uranusrise: #{uranusrise}, uranusset: #{uranusset}, neptunerise: #{neptunerise}, neptuneset: #{neptuneset}, plutorise: #{plutorise}, plutoset: #{plutoset}" end |