Module: JSONSelect::KeyHelpers

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

Instance Method Summary collapse

Instance Method Details

#format_has_class(test) ⇒ Object



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

def format_has_class(test)
  ".#{test[:n]}"
end

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



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

def has_class(object, test, key, idx, size, depth)
  test[:n] == key.to_s
end