Pardon my ignorance, but how would I begin to go about creating the following type of dictionary:
"please give your new library a name"
French
what I want is to then create a new hash as the value to the key French { "French" => "{}" }
as then in the value to key French it could be updated to look like { {"hello" => "bonjour", "bonjour" => "hello"}, {"good" => "bon", "bon" => "good}, ... }
I hope you can see what I am trying to do. Perhaps I am going about this the completely wrong way?
Edit… perhaps something along these lines?
puts "please give your new library a name"
user_libs = Hash.new
sub = gets.chomp
user_libs[sub] = {}
puts user_libs
1 Answer