Class: Textus::Read::RuleExplain
- Inherits:
-
Object
- Object
- Textus::Read::RuleExplain
- Extended by:
- Contract::DSL
- Defined in:
- lib/textus/read/rule_explain.rb
Overview
Effective rules for a key, at two depths (ADR 0059). Lean by default —‘{ fetch, guard }`, the agent-cheap read that was the `rules` verb. With `detail: true` it returns the verbose explanation — every matching policy block plus the per-transition guard predicate names — that was `policy_explain`. One verb, one name across CLI/MCP/method; the audience split is a parameter, not two tools.
Instance Method Summary collapse
- #call(key, detail: false) ⇒ Object
-
#initialize(container:, call: nil) ⇒ RuleExplain
constructor
rubocop:disable Lint/UnusedMethodArgument.
Methods included from Contract::DSL
arg, around, cli, cli_stdin, contract, contract?, summary, surfaces, verb, view
Constructor Details
#initialize(container:, call: nil) ⇒ RuleExplain
rubocop:disable Lint/UnusedMethodArgument
22 23 24 25 |
# File 'lib/textus/read/rule_explain.rb', line 22 def initialize(container:, call: nil) # rubocop:disable Lint/UnusedMethodArgument @manifest = container.manifest @schemas = container.schemas end |
Instance Method Details
#call(key, detail: false) ⇒ Object
27 28 29 |
# File 'lib/textus/read/rule_explain.rb', line 27 def call(key, detail: false) detail ? explain(key) : effective(key) end |