Top Level Namespace

Defined Under Namespace

Classes: Array, BooleanMatcher, Comparator, Hash, HashDealer, Numeric, Object, PathString, String, TimeDateMatcher, VariableArray

Instance Method Summary collapse

Instance Method Details



6
7
8
9
10
11
12
13
14
15
# File 'lib/matcher.rb', line 6

def print_diff(diff, depth = 1)
  puts "#{"\t" * depth}" + "HashDealer::#{diff.first.to_s}".bold.cyan + "\t\t\t\tResponse::#{diff.last.to_s}".bold.yellow if diff.is_a?(Array)
  if diff.is_a?(Hash)
    diff.each_pair do |k, v|
      puts "\n"
      puts (("\t" * depth) + k.to_s).red
      print_diff(v, depth + 1)
    end
  end
end