Module: Utils::IRB
- Defined in:
- lib/utils/irb.rb
Overview
A module that extends Ruby’s core classes with additional utility methods for interactive development.
Provides enhanced functionality for IRB sessions through method extensions on Object, String, and Regexp classes. Includes features like improved pattern matching, shell command integration, file I/O operations, performance measurement tools, and developer productivity enhancements.
Defined Under Namespace
Modules: Regexp, Shell, String Classes: IRBServer
Class Method Summary collapse
-
.configure ⇒ Object
The configure method sets up IRB configuration options.
Class Method Details
.configure ⇒ Object
The configure method sets up IRB configuration options.
This method configures the IRB environment by setting the history save limit and customizing the prompt display when IRB is running in interactive mode.
868 869 870 871 872 873 874 875 876 877 878 879 880 |
# File 'lib/utils/irb.rb', line 868 def self.configure ::IRB.conf[:SAVE_HISTORY] = 1000 if ::IRB.conf[:PROMPT] ::IRB.conf[:PROMPT][:CUSTOM] = { :PROMPT_I => ">> ", :PROMPT_N => ">> ", :PROMPT_S => "%l> ", :PROMPT_C => "+> ", :RETURN => " # => %s\n" } ::IRB.conf[:PROMPT_MODE] = :CUSTOM end end |