Class: Protege::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/protege/engine.rb

Overview

Rails engine that mounts Protege into a host application. This is the boot seam of the LOGI pipeline: it wires inbound email to the Gateway via Action Mailbox routing, exposes the engine's lib/ to autoloading so Orchestrator/Inference constructs resolve lazily, shares route helpers into the host's view context for Turbo broadcasts, and installs the inference stream broadcaster and engine migrations. It runs an isolated Protege namespace so host and engine constants never collide.

Instance Method Summary collapse

Instance Method Details

#lib_path(rel_path) ⇒ String

Return the absolute path to a file in the engine's lib/ directory. Used by the engine's rake tasks to locate templates and other static assets.

Parameters:

  • rel_path (String)

    the relative path from lib/

Returns:

  • (String)


98
99
100
101
# File 'lib/protege/engine.rb', line 98

def lib_path(rel_path)
  lib = File.expand_path('..', __dir__)
  File.join(lib, rel_path)
end