Class: Geocodio::Timezone

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload = {}) ⇒ Timezone

Returns a new instance of Timezone.



6
7
8
9
10
# File 'lib/geocodio/timezone.rb', line 6

def initialize(payload = {})
  @name         = payload['name']
  @utc_offset   = payload['utc_offset']
  @observes_dst = payload['observes_dst']
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#utc_offsetObject (readonly)

Returns the value of attribute utc_offset.



4
5
6
# File 'lib/geocodio/timezone.rb', line 4

def utc_offset
  @utc_offset
end

Instance Method Details

#observes_dst?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/geocodio/timezone.rb', line 12

def observes_dst?
  !!@observes_dst
end