Class: Factorix::CLI::Commands::Man
- Defined in:
- lib/factorix/cli/commands/man.rb
Overview
Display the Factorix manual page
This command opens the man page for factorix using the system’s man command.
Instance Method Summary collapse
-
#call ⇒ void
Execute the man command.
Methods inherited from Base
backup_support!, confirmable!, inherited, require_game_stopped!
Instance Method Details
#call ⇒ void
This method returns an undefined value.
Execute the man command
19 20 21 22 23 24 25 |
# File 'lib/factorix/cli/commands/man.rb', line 19 def call(**) system("command -v man > /dev/null 2>&1") raise CommandNotFoundError, "man command is not available on this system" unless $?.success? man_page = File.("../../../../doc/factorix.1", __dir__) exec "man", man_page end |