Method: Redis::Objects::ClassMethods#first_ancestor_with

Defined in:
lib/redis/objects.rb

#first_ancestor_with(name) ⇒ Object



226
227
228
229
230
231
232
# File 'lib/redis/objects.rb', line 226

def first_ancestor_with(name)
  if redis_objects && redis_objects.key?(name.to_sym)
    self
  elsif superclass && superclass.respond_to?(:redis_objects)
    superclass.first_ancestor_with(name)
  end
end