Class: EarthTools::Date
- Inherits:
-
Object
- Object
- EarthTools::Date
- Defined in:
- lib/earth_tools/date.rb
Instance Attribute Summary collapse
-
#day ⇒ Object
Returns the value of attribute day.
-
#dst ⇒ Object
Returns the value of attribute dst.
-
#month ⇒ Object
Returns the value of attribute month.
-
#timezone ⇒ Object
Returns the value of attribute timezone.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Date
constructor
A new instance of Date.
Constructor Details
#initialize(attrs = {}) ⇒ Date
Returns a new instance of Date.
5 6 7 8 9 10 11 |
# File 'lib/earth_tools/date.rb', line 5 def initialize(attrs = {}) attrs ||= {} @day = attrs['day'] @month = attrs['month'] @timezone = attrs['timezone'] @dst = attrs['dst'] end |
Instance Attribute Details
#day ⇒ Object
Returns the value of attribute day.
3 4 5 |
# File 'lib/earth_tools/date.rb', line 3 def day @day end |
#dst ⇒ Object
Returns the value of attribute dst.
3 4 5 |
# File 'lib/earth_tools/date.rb', line 3 def dst @dst end |
#month ⇒ Object
Returns the value of attribute month.
3 4 5 |
# File 'lib/earth_tools/date.rb', line 3 def month @month end |
#timezone ⇒ Object
Returns the value of attribute timezone.
3 4 5 |
# File 'lib/earth_tools/date.rb', line 3 def timezone @timezone end |