Module: Bombshell::Shell::Commands

Included in:
Bombshell::Shell
Defined in:
lib/bombshell/shell/commands.rb

Overview

Standard commands that show up in all Bombshell shells.

Constant Summary

HIDE =

An explicit list of commands to hide from tab completion.

[:method_missing, :get_binding, :_prompt, :to_s]

Instance Method Summary (collapse)

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(*args)

Provide an error message for unknown commands rather than raise an exception.



14
15
16
17
# File 'lib/bombshell/shell/commands.rb', line 14

def method_missing(*args)
  return if [:extend, :respond_to?].include? args.first
  puts "Unknown command #{args.first}"
end

Instance Method Details

- (Object) quit

Exit safely, accounting for the fact that we might be inside a subshell.



9
10
11
# File 'lib/bombshell/shell/commands.rb', line 9

def quit
  throw :IRB_EXIT
end