Class: TwitterCldr::Timezones::Location
- Inherits:
-
Object
- Object
- TwitterCldr::Timezones::Location
- Defined in:
- lib/twitter_cldr/timezones/location.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#tz ⇒ Object
readonly
Returns the value of attribute tz.
Instance Method Summary collapse
-
#initialize(tz) ⇒ Location
constructor
A new instance of Location.
- #resource ⇒ Object
- #tz_id ⇒ Object
Constructor Details
#initialize(tz) ⇒ Location
Returns a new instance of Location.
6 7 8 |
# File 'lib/twitter_cldr/timezones/location.rb', line 6 def initialize(tz) @tz = tz end |
Instance Attribute Details
#tz ⇒ Object (readonly)
Returns the value of attribute tz.
4 5 6 |
# File 'lib/twitter_cldr/timezones/location.rb', line 4 def tz @tz end |
Instance Method Details
#resource ⇒ Object
14 15 16 |
# File 'lib/twitter_cldr/timezones/location.rb', line 14 def resource @resource ||= TwitterCldr.get_locale_resource(tz.locale, :timezones)[tz.locale] end |
#tz_id ⇒ Object
10 11 12 |
# File 'lib/twitter_cldr/timezones/location.rb', line 10 def tz_id tz.identifier end |