Methods
- #
- A
- C
- E
- L
- R
Constants
NO_OVERRIDE | = | 0 |
OVERRIDE_ALL | = | 0x02 |
OVERRIDE_PRIVATE_ONLY | = | 0x01 |
Attributes
[R] | commands |
Class Public methods
_register_with_aliases(name, command_class, *aliases) Link
This API is for IRB’s internal use only and may change at any time. Please do NOT use it.
all_commands_info() Link
# File ruby/lib/irb/default_commands.rb, line 45 def all_commands_info user_aliases = IRB.CurrentContext.command_aliases.each_with_object({}) do |(alias_name, target), result| result[target] ||= [] result[target] << alias_name end commands.map do |command_name, (command_class, aliases)| aliases = aliases.map { |a| a.first } if additional_aliases = user_aliases[command_name] aliases += additional_aliases end display_name = aliases.shift || command_name { display_name: display_name, description: command_class.description, category: command_class.category } end end
command_names() Link
command_override_policies() Link
execute_as_command?(name, public_method:, private_method:) Link
load_command(command) Link
Convert a command name to its implementation class if such command exists
# File ruby/lib/irb/default_commands.rb, line 89 def load_command(command) command = command.to_sym commands.each do |command_name, (command_class, aliases)| if command_name == command || aliases.any? { |alias_name, _| alias_name == command } return command_class end end nil end