Method: BBLib::HashPathProc#check_condition

Defined in:
lib/hash_path/proc.rb

#check_condition(value) ⇒ Object



31
32
33
34
35
36
37
38
39
40
# File 'lib/hash_path/proc.rb', line 31

def check_condition(value)
  return true unless condition
  if condition.is_a?(String)
    eval(condition)
  else
    condition.call(value)
  end
rescue => e
  false
end