Sha256: a38e030a3369c86ff624023e1f0d36fbd7ea678c14b0966724109a9ec7ded199

Contents?: true

Size: 520 Bytes

Versions: 4

Compression:

Stored size: 520 Bytes

Contents

module Yoda
  module Store
    module Adapters
      require 'yoda/store/adapters/base'
      require 'yoda/store/adapters/gdbm_adapter'
      require 'yoda/store/adapters/memory_adapter'

      # @return [Class<Base>]
      def self.default_adapter_class
        GdbmAdapter
      end

      # @param path [String, nil]
      def self.for(path)
        if path
          default_adapter_class.for(path + ".#{default_adapter_class.type}")
        else
          MemoryAdapter.new
        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/adapters.rb
yoda-language-server-0.10.0 lib/yoda/store/adapters.rb
yoda-language-server-0.9.0 lib/yoda/store/adapters.rb
yoda-language-server-0.8.0 lib/yoda/store/adapters.rb