Sha256: 94b1f8aa1aa7272295e2b91048107078c686f0ab8e5c45490ef4a7110cba6000

Contents?: true

Size: 1.02 KB

Versions: 12

Compression:

Stored size: 1.02 KB

Contents

# frozen_string_literal: true

require 'ledger_sync'
require_relative 'domains/version'
require_relative 'domains/store'
require_relative 'domains/serializer'
require_relative 'domains/operation'
require_relative 'domains/operation/resource'
require_relative 'domains/operation/add'
require_relative 'domains/operation/find'
require_relative 'domains/operation/remove'
require_relative 'domains/operation/search'
require_relative 'domains/operation/transition'
require_relative 'domains/operation/update'

module LedgerSync
  module Domains
    def self.domains
      @domains ||= LedgerSync::Domains::ConfigurationStore.new
    end

    def self.register_domain(*args, **params)
      config = LedgerSync::Domains::Configuration.new(*args, **params)
      yield(config) if block_given?

      domains.register_domain(config: config)
    end

    def self.register_main_domain
      config = LedgerSync::Domains::Configuration.new(:main, base_module: nil)
      config.name = 'Main'

      domains.register_domain(config: config)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ledger_sync-domains-1.1.0 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.5 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.4 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.3 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.2 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.1 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.0 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.0.rc10 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.0.rc9 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.0.rc8 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.0.rc7 lib/ledger_sync/domains.rb
ledger_sync-domains-1.0.0.rc6 lib/ledger_sync/domains.rb