Method: BBLib::HashPathProcs.evaluate
- Defined in:
- lib/hash_path/processors.rb
.evaluate(child, *args, class_based: true) ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/hash_path/processors.rb', line 59 def self.evaluate(child, *args, class_based: true) value = child.value if args.first.is_a?(String) child.replace_with(eval(args.first)) else child.replace_with(args.first.call(value)) end end |