Class: Textus::Operations::Reads

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/operations/reads.rb

Instance Method Summary collapse

Constructor Details

#initialize(ctx) ⇒ Reads

‘get` — pure read; returns envelope + freshness verdict;

never triggers refresh; no orchestrator dependency.

‘get_or_refresh` — composes `get` with the refresh orchestrator; runs

refresh per policy when the verdict says stale.
Use this for interactive reads where the caller
wants the freshest envelope obtainable.

Pick ‘get` for materialization paths (build, projection, schema tooling). Pick `get_or_refresh` for interactive `textus get` and equivalent.



13
14
15
# File 'lib/textus/operations/reads.rb', line 13

def initialize(ctx)
  @ctx = ctx
end

Instance Method Details

#auditObject



30
# File 'lib/textus/operations/reads.rb', line 30

def audit          = Application::Reads::Audit.new(ctx: @ctx)

#blameObject



31
# File 'lib/textus/operations/reads.rb', line 31

def blame          = Application::Reads::Blame.new(ctx: @ctx)

#depsObject



37
# File 'lib/textus/operations/reads.rb', line 37

def deps            = Application::Reads::Deps.new(ctx: @ctx)

#freshnessObject



29
# File 'lib/textus/operations/reads.rb', line 29

def freshness      = Application::Reads::Freshness.new(ctx: @ctx)

#getObject



17
18
19
# File 'lib/textus/operations/reads.rb', line 17

def get
  Application::Reads::Get.new(ctx: @ctx)
end

#get_or_refreshObject

rubocop:disable Naming/AccessorMethodName



21
22
23
24
25
26
27
# File 'lib/textus/operations/reads.rb', line 21

def get_or_refresh # rubocop:disable Naming/AccessorMethodName
  Application::Reads::GetOrRefresh.new(
    ctx: @ctx,
    get: get,
    orchestrator: orchestrator,
  )
end

#listObject



33
# File 'lib/textus/operations/reads.rb', line 33

def list           = Application::Reads::List.new(ctx: @ctx)

#policy_explainObject



32
# File 'lib/textus/operations/reads.rb', line 32

def policy_explain = Application::Reads::PolicyExplain.new(ctx: @ctx)

#publishedObject



39
# File 'lib/textus/operations/reads.rb', line 39

def published       = Application::Reads::Published.new(ctx: @ctx)

#rdepsObject



38
# File 'lib/textus/operations/reads.rb', line 38

def rdeps           = Application::Reads::Rdeps.new(ctx: @ctx)

#schema_envelopeObject



36
# File 'lib/textus/operations/reads.rb', line 36

def schema_envelope = Application::Reads::SchemaEnvelope.new(ctx: @ctx)

#staleObject



40
# File 'lib/textus/operations/reads.rb', line 40

def stale           = Application::Reads::Stale.new(ctx: @ctx)

#uidObject



35
# File 'lib/textus/operations/reads.rb', line 35

def uid             = Application::Reads::Uid.new(ctx: @ctx)

#validate_allObject



41
# File 'lib/textus/operations/reads.rb', line 41

def validate_all    = Application::Reads::ValidateAll.new(ctx: @ctx)

#whereObject



34
# File 'lib/textus/operations/reads.rb', line 34

def where           = Application::Reads::Where.new(ctx: @ctx)