Runs through the argument array getting strings that contains “:” and
mark it as a hash:
["name:string","age:integer"]
Becomes:
{"name"=>"string","age"=>"integer"}
# File lib/bundler/vendor/thor/lib/thor/parser/arguments.rb, line 97
def parse_hash(name)
return shift if peek.is_a?(Hash)
hash = {}
while current_is_value? && peek.include?(":")
key, value = shift.split(":", 2)
raise MalformattedArgumentError, "You can't specify '#{key}' more than once in option '#{name}'; got #{key}:#{hash[key]} and #{key}:#{value}" if hash.include? key
hash[key] = value
end
hash
end