Module: Magik::Ledger

Defined in:
lib/magik/ledger.rb

Overview

Double-entry ledgers with boot-time balance validation and append-only entries, plus the audit and multi-step flow primitives that fintech work needs.

Implements: Phase 5 — Money & Compliance of docs/idea/00-build-spec.md.

Planned DSL surface, copied from the spec:

* `ledger :Name do account; entry do debit/credit/guard end end`
* `audited + immutable_after: model annotations`
* `flow :Name do step ... end — multi-step wizards`

Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.

See Also:

Constant Summary collapse

SPEC_PHASE =

The build-spec phase this subsystem implements.

Returns:

  • (String)
"Phase 5 — Money & Compliance"
DSL_SURFACE =

The DSL this subsystem will expose, verbatim from the spec.

Returns:

  • (Array<String>)
[
  "ledger :Name do account; entry do debit/credit/guard end end",
  "audited + immutable_after: model annotations",
  "flow :Name do step ... end — multi-step wizards"
].freeze
STATUS =

Implementation status of this subsystem.

Returns:

  • (String)
"Not implemented — spec only"

Class Method Summary collapse

Class Method Details

.define(*_args, **_options) ⇒ void

This method returns an undefined value.

Entry point for the Ledger DSL.

Parameters:

  • _args (Array)

    ignored

  • _options (Hash)

    ignored

Raises:

  • (NotImplementedError)

    always, until Phase 5 lands



43
44
45
# File 'lib/magik/ledger.rb', line 43

def self.define(*_args, **_options)
  raise NotImplementedError, "Magik::Ledger is spec-only; see docs/idea/00-build-spec.md"
end