Module: TZInfoExtension::ClassMethods

Included in:
ActiveSupport::TimeZone, TZInfo::Timezone
Defined in:
lib/has_zone/tzinfo.rb

Instance Method Summary collapse

Instance Method Details

#abbreviations_mapObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/has_zone/tzinfo.rb', line 5

def abbreviations_map
  @abbreviations_map ||= begin
    (abbreviations_map = {}).tap do |am|
      all.each do |tz|
        tz.abbreviations.each do |abb|
          if am[abb].present?
            am[abb] << tz
          else
            am[abb] = [tz]
          end
        end
      end
    end
  end
end