Can I check the a hash contain another hash in deep check?

h = {'Member'=>{'number'=>{'name'=>'Name'}}}

Can I check from the key which the value is also hashes?
example:

h['Member'].has_hash_value = true/ false

some kind like this... Can I?

···

--
Posted via http://www.ruby-forum.com/.

Siratinee Sukachai wrote in post #994555:

h = {'Member'=>{'number'=>{'name'=>'Name'}}}

Can I check from the key which the value is also hashes?
example:

has_hash_value(h['Member']) = true/ false

some kind like this... Can I?

h = {'Member'=>{'number'=>{'name'=>'Name'}}}

if h['Member'].instance_of?(Hash)
  puts 'yes'
end

--output:--
yes

···

--
Posted via http://www.ruby-forum.com/\.