# File lib/ruote/util/lookup.rb, line 56 def self.has_key?(collection, key) return collection if key == '.' key, rest = pop_key(key) return has_key?(fetch(collection, key), rest) if rest.any? if collection.respond_to?(:has_key?) collection.has_key?(key) elsif collection.respond_to?(:[]) key.to_i < collection.size else false end end