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