class ISO3166::KwargStruct

Public Class Methods

new(*args) click to toggle source

Override the initialize to handle hashes of named parameters

Calls superclass method
# File lib/countries/kwarg_struct.rb, line 4
def initialize(*args)
  opts = args.last.is_a?(Hash) ? args.pop : {}
  super(*args)
  opts.each_pair do |k, v|
    send "#{k}=", v
  end
end