Module: Lode

Defined in:
lib/lode.rb,
lib/lode/client.rb,
lib/lode/setting.rb,
lib/lode/tables/value.rb,
lib/lode/configuration.rb,
lib/lode/tables/abstract.rb,
lib/lode/tables/dictionary.rb,
lib/lode/refines/persistent_store.rb

Overview

Main namespace.

Defined Under Namespace

Modules: Refines, Tables Classes: Client, Configuration

Constant Summary collapse

PRIMARY_KEY =
:id
MODES =
%i[default thread file max].freeze
Setting =

Defines a configuration setting.

Data.define :model, :primary_key do
  def initialize model: Hash, primary_key: PRIMARY_KEY
    super
  end
end

Class Method Summary collapse

Class Method Details

.loader(registry = Zeitwerk::Registry) ⇒ Object



16
17
18
# File 'lib/lode.rb', line 16

def self.loader registry = Zeitwerk::Registry
  @loader ||= registry.loaders.find { |loader| loader.tag == File.basename(__FILE__, ".rb") }
end

.newObject



20
# File 'lib/lode.rb', line 20

def self.new(...) = Client.new(...)