Module: JSONSelect::DepthHelpers

Defined in:
lib/json_select/helpers/depth.rb

Instance Method Summary collapse

Instance Method Details

#format_is_root(test) ⇒ Object



7
8
9
# File 'lib/json_select/helpers/depth.rb', line 7

def format_is_root(test)
  ":root"
end

#is_root(object, test, key, idx, size, depth) ⇒ Object



3
4
5
# File 'lib/json_select/helpers/depth.rb', line 3

def is_root(object, test, key, idx, size, depth)
  depth == 0
end