module Hashie::Extensions::DeepLocate
def self.deep_locate(comparator, object)
DeepLocate.deep_locate -> (key, value, object) { key == :title }, books
]
...
},
pages: 120
title: "Ruby for beginners",
{
books = [
@example
see #deep_locate.
to include/extend the base datastructure. For further examples please
The module level implementation of #deep_locate, incase you do not want
def self.deep_locate(comparator, object) unless comparator.respond_to?(:call) comparator = _construct_key_comparator(comparator, object) end _deep_locate(comparator, object) end