summaryrefslogtreecommitdiff
path: root/lib/irb/command/context.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb/command/context.rb')
-rw-r--r--lib/irb/command/context.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/irb/command/context.rb b/lib/irb/command/context.rb
new file mode 100644
index 0000000000..b4fc807343
--- /dev/null
+++ b/lib/irb/command/context.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module IRB
+ module Command
+ class Context < Base
+ category "IRB"
+ description "Displays current configuration."
+
+ def execute(_arg)
+ # This command just displays the configuration.
+ # Modifying the configuration is achieved by sending a message to IRB.conf.
+ Pager.page_content(IRB.CurrentContext.inspect)
+ end
+ end
+ end
+end