Class: Factorix::CLI::Commands::Path
- Defined in:
- lib/factorix/cli/commands/path.rb
Overview
Display Factorio and Factorix paths
This command outputs all paths managed by the runtime environment.
Instance Method Summary collapse
-
#call(json:) ⇒ void
Execute the path command.
Methods inherited from Base
backup_support!, confirmable!, inherited, require_game_stopped!
Instance Method Details
#call(json:) ⇒ void
This method returns an undefined value.
Execute the path command
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/factorix/cli/commands/path.rb', line 58 def call(json:, **) logger.debug("Displaying all paths") result = PATH_TYPES.transform_values {|method_name| runtime.public_send(method_name).to_s } if json out.puts JSON.pretty_generate(result) else output_table(result) end end |