Class: Mysh::InitOption
- Inherits:
-
CommandOption
- Object
- Action
- CommandOption
- Mysh::InitOption
- Defined in:
- lib/mysh/internal/actions/command_line/init.rb
Overview
-
mysh/internal/actions/command_line/init.rb – The mysh init command.
Constant Summary
Constants inherited from Action
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#post_boot(read_point) ⇒ Object
Execute the init command line option.
-
#pre_boot(read_point) ⇒ Object
Skip over the argument for pre_boot.
Methods inherited from CommandOption
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
#post_boot(read_point) ⇒ Object
Execute the init command line option.
23 24 25 |
# File 'lib/mysh/internal/actions/command_line/init.rb', line 23 def post_boot(read_point) get_arg(read_point) end |
#pre_boot(read_point) ⇒ Object
Skip over the argument for pre_boot.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/mysh/internal/actions/command_line/init.rb', line 10 def pre_boot(read_point) file_name = get_arg(read_point).decorate if $mysh_init_file $mysh_init_file = $mysh_init_file.in_array + [file_name] else $mysh_init_file = file_name end mysh "load #{file_name}" end |