class Thor::Options
def initialize(hash_options={}, defaults={})
def initialize(hash_options={}, defaults={}) options = hash_options.values super(options) # Add defaults defaults.each do |key, value| @assigns[key.to_s] = value @non_assigned_required.delete(hash_options[key]) end @shorts, @switches, @extra = {}, {}, [] options.each do |option| @switches[option.switch_name] = option option.aliases.each do |short| @shorts[short.to_s] ||= option.switch_name end end end