Class: Textus::Application::Writes::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/application/writes/build.rb

Instance Method Summary collapse

Constructor Details

#initialize(ctx:, bus:) ⇒ Build

Returns a new instance of Build.



5
6
7
8
# File 'lib/textus/application/writes/build.rb', line 5

def initialize(ctx:, bus:)
  @ctx = ctx
  @bus = bus
end

Instance Method Details

#call(prefix: nil) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/textus/application/writes/build.rb', line 10

def call(prefix: nil)
  # Delegate to legacy Builder for the materialization/projection logic.
  # Builder fires its own events through @store.fire_event; we do NOT
  # double-fire from here. Full extraction of Builder internals into
  # Writes::Build is deferred to 0.10.0.
  #
  # TODO(0.10.0): propagate @ctx.correlation_id through :built/:published
  # events once Builder internals are extracted into this use case.
  legacy = Textus::Builder.new(@ctx.store)
  legacy.build(prefix: prefix)
end