Sha256: 18038e954c0b4fdb60e93c6f9a634cf94831393ae9a297a28bf64431cfbc54aa

Contents?: true

Size: 652 Bytes

Versions: 4

Compression:

Stored size: 652 Bytes

Contents

module Yoda
  module Store
    module Objects
      module Library
        module WithRegistry
          # @return [Boolean]
          def registry_exists?
            registry_path && File.exists?(registry_path)
          end

          # Return the path of registry for the library.
          # @abstract
          # @return [String, nil]
          def registry_path
            fail NotImplementedError
          end

          # @return [Registry::LibraryRegistry]
          def registry
            @registry ||= begin
              Registry::LibraryRegistry.for_library(self)
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 lib/yoda/store/objects/library/with_registry.rb
yoda-language-server-0.10.0 lib/yoda/store/objects/library/with_registry.rb
yoda-language-server-0.9.0 lib/yoda/store/objects/library/with_registry.rb
yoda-language-server-0.8.0 lib/yoda/store/objects/library/with_registry.rb