lib/countries/timezones.rb in countries-4.2.3 vs lib/countries/timezones.rb in countries-5.0.0

- old
+ new

@@ -1,13 +1,16 @@ +# frozen_string_literal: true + module ISO3166 # Extend Country class with support for timezones. Requires the {tzinfo}[https://github.com/tzinfo/tzinfo] gem # # gem 'tzinfo' # module TimezoneExtensions + # TODO: rename method to tz_country or something similar def timezones - @tz_country ||= TZInfo::Country.get(alpha2) + @timezones ||= TZInfo::Country.get(alpha2) end end end -ISO3166::Country.send(:include, ISO3166::TimezoneExtensions) +ISO3166::Country.include ISO3166::TimezoneExtensions