Class: Yoda::Store::Query::FindMetaClass

Inherits:
Base
  • Object
show all
Defined in:
lib/yoda/store/query/find_meta_class.rb

Instance Attribute Summary

Attributes inherited from Base

#registry

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Yoda::Store::Query::Base

Instance Method Details

#find(path) ⇒ Objects::NamespaceObject?

Parameters:

Returns:



7
8
9
10
11
12
13
14
# File 'lib/yoda/store/query/find_meta_class.rb', line 7

def find(path)
  constant = FindConstant.new(registry).find(path)
  if constant && meta_class = registry.get(constant.meta_class_address)
    meta_class
  else
    nil
  end
end