module ISO3166
Extend Country
class with support for timezones
Constants
- DEFAULT_COUNTRY_HASH
- DEFAULT_SUBDIVISION_HASH
- Subdivision
- UNSEARCHABLE_METHODS
Attributes
configuration[W]
Public Class Methods
Country(country_data_or_country)
click to toggle source
# File lib/countries/country/class_methods.rb, line 6 def self::Country(country_data_or_country) case country_data_or_country when ISO3166::Country country_data_or_country when String, Symbol ISO3166::Country.search(country_data_or_country) else raise TypeError, "can't convert #{country_data_or_country.class.name} into ISO3166::Country" end end
configuration()
click to toggle source
# File lib/countries/configuration.rb, line 6 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
# File lib/countries/configuration.rb, line 15 def self.configure yield(configuration) end
reset()
click to toggle source
# File lib/countries/configuration.rb, line 10 def self.reset @configuration = Configuration.new Data.reset end