Module: Magik::Router

Defined in:
lib/magik/router.rb

Overview

Convention-driven routing: an action name becomes a path, a screen auto-routes. Also the dev server and hot reload entry point.

Implements: Phase 2 — Rendering & Actions (build order step 4) of docs/idea/00-build-spec.md.

Planned DSL surface, copied from the spec:

* `convention: action name → path`
* `screens are auto-routed by name`

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 2 — Rendering & Actions (build order step 4)"
DSL_SURFACE =

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

Returns:

  • (Array<String>)
[
  "convention: action name → path",
  "screens are auto-routed by name"
].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 Router DSL.

Parameters:

  • _args (Array)

    ignored

  • _options (Hash)

    ignored

Raises:

  • (NotImplementedError)

    always, until Phase 2 lands



41
42
43
# File 'lib/magik/router.rb', line 41

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