Class: Geocodio::Timezone
- Inherits:
-
Object
- Object
- Geocodio::Timezone
- Defined in:
- lib/geocodio/timezone.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#utc_offset ⇒ Object
readonly
Returns the value of attribute utc_offset.
Instance Method Summary collapse
-
#initialize(payload = {}) ⇒ Timezone
constructor
A new instance of Timezone.
- #observes_dst? ⇒ Boolean
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/geocodio/timezone.rb', line 3 def name @name end |
#utc_offset ⇒ Object (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
12 13 14 |
# File 'lib/geocodio/timezone.rb', line 12 def observes_dst? !!@observes_dst end |