Method: ActiveUtils::Country#initialize

Defined in:
lib/active_utils/country.rb

#initialize(options = {}) ⇒ Country

Returns a new instance of Country.



42
43
44
45
46
# File 'lib/active_utils/country.rb', line 42

def initialize(options = {})
  requires!(options, :name, :alpha2, :alpha3, :numeric)
  @name = options.delete(:name)
  @codes = options.collect{|k,v| CountryCode.new(v)}
end