Method: Hash#include_value?
- Defined in:
- lib/soaspec/core_ext/hash.rb
#include_value?(value) ⇒ Boolean
Value present in nested Hash.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/soaspec/core_ext/hash.rb', line 41 def include_value?(value) each_value do |v| return true if v == value next unless v.is_a? Hash v.each_value do |v| return true if v == value next unless v.is_a? Hash v.each_value do |v| return true if v == value end end end false end |