Class: IRB::Command::Load
- Inherits:
-
LoaderCommand
- Object
- Base
- LoaderCommand
- IRB::Command::Load
- Defined in:
- lib/irb/command/load.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from LoaderCommand
Methods included from IrbLoader
#irb_load, #load_file, #old, #search_file_from_ruby_path, #source_file
Methods included from RubyArgsExtractor
#ruby_args, #unwrap_string_literal
Methods inherited from Base
category, description, execute, help_message, #initialize
Constructor Details
This class inherits a constructor from IRB::Command::Base
Instance Method Details
#execute(arg) ⇒ Object
25 26 27 28 |
# File 'lib/irb/command/load.rb', line 25 def execute(arg) args, kwargs = ruby_args(arg) execute_internal(*args, **kwargs) end |
#execute_internal(file_name = nil, priv = nil) ⇒ Object
30 31 32 33 |
# File 'lib/irb/command/load.rb', line 30 def execute_internal(file_name = nil, priv = nil) raise_cmd_argument_error unless file_name irb_load(file_name, priv) end |