Class: Mysh::CommandOption
- Defined in:
- lib/mysh/internal/actions/command_line.rb
Overview
-
mysh/internal/actions/command_line.rb – The mysh internal command line option.
Direct Known Subclasses
DebugOption, InitOption, LoadOption, NoDebugOption, NoInitOption, NoPostpromptOption, NoPrepromptOption, NoPromptOption, PostpromptOption, PrepromptOption, PromptOption, QuitOption, UsageOption
Constant Summary
Constants inherited from Action
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#get_arg(read_point) ⇒ Object
Get an argument for an option.
-
#post_boot(_args) ⇒ Object
Execute a post-boot command line option.
-
#pre_boot(_args) ⇒ Object
(also: #process_command)
Execute a pre-boot command line option.
Methods inherited from Action
#action_info, #initialize, #process_quick_command, #short_name
Constructor Details
This class inherits a constructor from Mysh::Action
Instance Method Details
#get_arg(read_point) ⇒ Object
Get an argument for an option.
21 22 23 24 25 26 27 |
# File 'lib/mysh/internal/actions/command_line.rb', line 21 def get_arg(read_point) result = read_point.next fail if COMMAND_LINE.exists?(result) #An arg should not be a command! result rescue fail "Error in #{short_name.inspect}: Invalid argument: #{result.inspect}" end |
#post_boot(_args) ⇒ Object
Execute a post-boot command line option.
16 |
# File 'lib/mysh/internal/actions/command_line.rb', line 16 def post_boot(_args); end |
#pre_boot(_args) ⇒ Object Also known as: process_command
Execute a pre-boot command line option.
13 |
# File 'lib/mysh/internal/actions/command_line.rb', line 13 def pre_boot(_args); end |