Class: PrettyIRB::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/pretty_irb/shell.rb

Constant Summary collapse

<<~BANNER
  ╔═══════════════════════════════════════════════════════════╗
  ║         🎨 Welcome to Pretty IRB 🎨                      ║
  ║                                                           ║
  ║  Enhanced Interactive Ruby Shell with Auto-Correct       ║
  ║  Type 'help' for commands or 'exit' to quit              ║
  ╚═══════════════════════════════════════════════════════════╝
BANNER

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Shell

Returns a new instance of Shell.



15
16
17
18
19
20
21
22
# File 'lib/pretty_irb/shell.rb', line 15

def initialize(config = {})
  @config = config
  @history_manager = HistoryManager.new
  @snippet_manager = SnippetManager.new
  @variable_inspector = VariableInspector.new(TOPLEVEL_BINDING)
  @input_buffer = ""
  @binding = TOPLEVEL_BINDING
end

Instance Method Details

#runObject



24
25
26
27
# File 'lib/pretty_irb/shell.rb', line 24

def run
  puts BANNER.light_magenta
  start_repl
end