Sha256: 34cef2b2ee47bb27dd5812468c273a9f2a794b4f64aca10f18939114ef76930f

Contents?: true

Size: 484 Bytes

Versions: 8

Compression:

Stored size: 484 Bytes

Contents

module Yoda
  module Store
    module Query
      class FindMetaClass < Base
        # @param path [String, Model::Path, Model::ScopedPath]
        # @return [Objects::NamespaceObject, nil]
        def find(path)
          constant = FindConstant.new(registry).find(path)
          if constant && meta_class = registry.find(Objects::MetaClassObject.address_of(constant.path))
            meta_class
          else
            nil
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
yoda-language-server-0.7.2 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.7.1 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.7.0 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.6.2 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.6.1 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.6.0 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.5.0 lib/yoda/store/query/find_meta_class.rb
yoda-language-server-0.4.0 lib/yoda/store/query/find_meta_class.rb