Class: EarthTools::Timezone

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Timezone

Returns a new instance of Timezone.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/earth_tools/timezone.rb', line 5

def initialize(attrs = {})
  attrs ||= {}
  @version = attrs['version']
  @location = EarthTools::Location.new(attrs['location'])
  @offset = attrs['offset']
  @suffix = attrs['suffix']
  @localtime = attrs['localtime']
  @isotime = attrs['isotime']
  @utctime = attrs['utctime']
  @dst = attrs['dst']
end

Instance Attribute Details

#dstObject

Returns the value of attribute dst.



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

def dst
  @dst
end

#isotimeObject

Returns the value of attribute isotime.



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

def isotime
  @isotime
end

#localtimeObject

Returns the value of attribute localtime.



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

def localtime
  @localtime
end

#locationObject

Returns the value of attribute location.



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

def location
  @location
end

#offsetObject

Returns the value of attribute offset.



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

def offset
  @offset
end

#suffixObject

Returns the value of attribute suffix.



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

def suffix
  @suffix
end

#utctimeObject

Returns the value of attribute utctime.



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

def utctime
  @utctime
end

#versionObject

Returns the value of attribute version.



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

def version
  @version
end