Class: Dry::CLI
- Inherits:
-
Object
- Object
- Dry::CLI
- Defined in:
- lib/pcli/services/commander.rb
Instance Method Summary collapse
Instance Method Details
#exit(code) ⇒ Object
5 |
# File 'lib/pcli/services/commander.rb', line 5 def exit(code); end |
#perform_registry(arguments) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pcli/services/commander.rb', line 7 def perform_registry(arguments) result = registry.get(arguments) return usage(result) unless result.found? command, args = parse(result.command, result.arguments, result.names) result.before_callbacks.run(command, args) output = command.call(**args) result.after_callbacks.run(command, args) output end |