summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0xAB <0xAB@protonmail.com>2017-08-30 22:47:00 +0100
committer0xAB <0xAB@protonmail.com>2017-08-30 22:47:00 +0100
commit7cdd5e64efc2841053a12a3e291301885f8018fc (patch)
tree1fb18d3a24d3d303a086dd633c8e2580d7fb6354
parent3cc7f056df3ceae9fbf705f29d48c2f89591eaad (diff)
downloadpry-7cdd5e64efc2841053a12a3e291301885f8018fc.tar.gz
add Pry#helpers, fix #1634
-rw-r--r--lib/pry/pry_instance.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb
index 4ffe4c58..b04eced8 100644
--- a/lib/pry/pry_instance.rb
+++ b/lib/pry/pry_instance.rb
@@ -81,6 +81,17 @@ class Pry
exec_hook(:when_started, target, options, self)
end
+ #
+ # @return [Module]
+ # Returns a module that includes basic utility helper functions.
+ #
+ def helpers
+ @helpers ||= Module.new {
+ extend Pry::Helpers::Text
+ extend Pry::Helpers::BaseHelpers
+ }
+ end
+
# The current prompt.
# This is the prompt at the top of the prompt stack.
#