Class: Ukiryu::CliCommands::ExtractCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Ukiryu::CliCommands::ExtractCommand
- Defined in:
- lib/ukiryu/cli_commands/extract_command.rb
Overview
Extract tool definition from an installed CLI tool
This command attempts to extract a tool definition by:
-
Trying the tool’s native –ukiryu-definition flag
-
Parsing the tool’s –help output as a fallback
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#run(tool_name) ⇒ Object
Execute the extract command.
Methods inherited from BaseCommand
#apply_cli_options_to_config, #default_register_path, #initialize, #setup_register, #stringify_keys
Constructor Details
This class inherits a constructor from Ukiryu::CliCommands::BaseCommand
Instance Method Details
#run(tool_name) ⇒ Object
Execute the extract command
14 15 16 17 18 19 20 21 22 |
# File 'lib/ukiryu/cli_commands/extract_command.rb', line 14 def run(tool_name) result = Ukiryu::Extractors::Extractor.extract(tool_name, ) if result[:success] output_result(result) else handle_failure(result) end end |