Class: EarthTools::Sun
- Inherits:
-
Object
- Object
- EarthTools::Sun
- Defined in:
- lib/earth_tools/sun.rb,
lib/earth_tools/sun/evening.rb,
lib/earth_tools/sun/morning.rb,
lib/earth_tools/sun/twilight.rb
Defined Under Namespace
Classes: Evening, Morning, Twilight
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#evening ⇒ Object
Returns the value of attribute evening.
-
#location ⇒ Object
Returns the value of attribute location.
-
#morning ⇒ Object
Returns the value of attribute morning.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Sun
constructor
A new instance of Sun.
Constructor Details
#initialize(attrs = {}) ⇒ Sun
Returns a new instance of Sun.
5 6 7 8 9 10 11 12 |
# File 'lib/earth_tools/sun.rb', line 5 def initialize(attrs = {}) attrs ||= {} @version = attrs['version'] @location = EarthTools::Location.new(attrs['location']) @date = EarthTools::Date.new(attrs['date']) @morning = EarthTools::Sun::Morning.new(attrs['morning']) @evening = EarthTools::Sun::Evening.new(attrs['evening']) end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/earth_tools/sun.rb', line 3 def date @date end |
#evening ⇒ Object
Returns the value of attribute evening.
3 4 5 |
# File 'lib/earth_tools/sun.rb', line 3 def evening @evening end |
#location ⇒ Object
Returns the value of attribute location.
3 4 5 |
# File 'lib/earth_tools/sun.rb', line 3 def location @location end |
#morning ⇒ Object
Returns the value of attribute morning.
3 4 5 |
# File 'lib/earth_tools/sun.rb', line 3 def morning @morning end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/earth_tools/sun.rb', line 3 def version @version end |