Class: Textus::CLI::Verb::PolicyExplain
- Inherits:
-
Textus::CLI::Verb
- Object
- Textus::CLI::Verb
- Textus::CLI::Verb::PolicyExplain
- Defined in:
- lib/textus/cli/verb/policy_explain.rb
Instance Attribute Summary
Attributes inherited from Textus::CLI::Verb
Instance Method Summary collapse
Methods inherited from Textus::CLI::Verb
#context_for, #emit, inherited, #initialize, needs_store?, option, options, #parse, #resolved_role
Constructor Details
This class inherits a constructor from Textus::CLI::Verb
Instance Method Details
#call(store) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/textus/cli/verb/policy_explain.rb', line 5 def call(store) key = positional.shift or raise UsageError.new("policy explain requires a KEY") ctx = context_for(store) result = Textus::Composition.policy_explain(ctx).call(key: key) emit({ "verb" => "policy_explain" }.merge(result.transform_keys(&:to_s))) end |