Class: Timezonedb::Client::Response
- Inherits:
-
Object
- Object
- Timezonedb::Client::Response
- Defined in:
- lib/timezonedb/client/response.rb
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
readonly
Returns the value of attribute abbreviation.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#dst ⇒ Object
readonly
Returns the value of attribute dst.
-
#gmt_offset ⇒ Object
readonly
Returns the value of attribute gmt_offset.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#zone_name ⇒ Object
readonly
Returns the value of attribute zone_name.
Instance Method Summary collapse
-
#initialize(response_hash) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response_hash) ⇒ Response
Returns a new instance of Response.
23 24 25 26 27 28 29 30 31 |
# File 'lib/timezonedb/client/response.rb', line 23 def initialize(response_hash) @message = response_hash['message'] @country_code = response_hash['countryCode'] @zone_name = response_hash['zoneName'] @abbreviation = response_hash['abbreviation'] @gmt_offset = response_hash['gmtOffset'] @dst = response_hash['dst'] @timestamp = response_hash['timestamp'] end |
Instance Attribute Details
#abbreviation ⇒ Object (readonly)
Returns the value of attribute abbreviation.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def abbreviation @abbreviation end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def country_code @country_code end |
#dst ⇒ Object (readonly)
Returns the value of attribute dst.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def dst @dst end |
#gmt_offset ⇒ Object (readonly)
Returns the value of attribute gmt_offset.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def gmt_offset @gmt_offset end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def status @status end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def @timestamp end |
#zone_name ⇒ Object (readonly)
Returns the value of attribute zone_name.
20 21 22 |
# File 'lib/timezonedb/client/response.rb', line 20 def zone_name @zone_name end |