class Pry::Config::Default
Public Class Methods
new()
click to toggle source
Calls superclass method
Pry::Config::Behavior.new
# File lib/pry/config/default.rb, line 116 def initialize super(nil) configure_gist configure_history end
Private Instance Methods
configure_gist()
click to toggle source
TODO: all of this configure_* stuff is a relic of old code. we should try move this code to being command-local.
# File lib/pry/config/default.rb, line 135 def configure_gist self["gist"] = Pry::Config.from_hash(inspecter: proc(&:pretty_inspect)) end
configure_history()
click to toggle source
# File lib/pry/config/default.rb, line 139 def configure_history self["history"] = Pry::Config.from_hash "should_save" => true, "should_load" => true history.file = File.expand_path("~/.pry_history") rescue nil if history.file.nil? self.should_load_rc = false history.should_save = false history.should_load = false end end
lazy_readline()
click to toggle source
# File lib/pry/config/default.rb, line 150 def lazy_readline require 'readline' Readline rescue LoadError warn "Sorry, you can't use Pry without Readline or a compatible library." warn "Possible solutions:" warn " * Rebuild Ruby with Readline support using `--with-readline`" warn " * Use the rb-readline gem, which is a pure-Ruby port of Readline" warn " * Use the pry-coolline gem, a pure-ruby alternative to Readline" raise end