Class: Mysh::HelpSubCommand

Inherits:
Action show all
Defined in:
lib/mysh/internal/actions/help/sub_help.rb

Overview

  • mysh/internal/actions/help/sub_help.rb – The mysh internal help sub commands.

Constant Summary

Constants inherited from Action

Action::ACTIONS_PATH

Instance Attribute Summary

Attributes inherited from Action

#description, #name

Instance Method Summary collapse

Methods inherited from Action

#action_info, #process_quick_command, #short_name

Constructor Details

#initialize(name, description, file_name) ⇒ HelpSubCommand

Setup a help command.



10
11
12
13
# File 'lib/mysh/internal/actions/help/sub_help.rb', line 10

def initialize(name, description, file_name)
  super(name, description)
  @file_name = file_name
end

Instance Method Details

#process_command(_args) ⇒ Object

Execute a help command.



16
17
18
# File 'lib/mysh/internal/actions/help/sub_help.rb', line 16

def process_command(_args)
  mysh "load #{(ACTIONS_PATH + 'help/' + @file_name).to_host_spec}"
end