Class: EarthTools::Date

Inherits:
Object
  • Object
show all
Defined in:
lib/earth_tools/date.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dayObject

Returns the value of attribute day.



3
4
5
# File 'lib/earth_tools/date.rb', line 3

def day
  @day
end

#dstObject

Returns the value of attribute dst.



3
4
5
# File 'lib/earth_tools/date.rb', line 3

def dst
  @dst
end

#monthObject

Returns the value of attribute month.



3
4
5
# File 'lib/earth_tools/date.rb', line 3

def month
  @month
end

#timezoneObject

Returns the value of attribute timezone.



3
4
5
# File 'lib/earth_tools/date.rb', line 3

def timezone
  @timezone
end