Class: TZInfo::Country

Inherits:
Object
  • Object
show all
Defined in:
lib/stats/tzinfo_extensions.rb

Class Method Summary collapse

Class Method Details

.code_to_name(code) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/stats/tzinfo_extensions.rb', line 4

def self.code_to_name code
  begin
    get(code).name
  rescue TZInfo::InvalidCountryCode
    code
  end
end