Class: Pry::Config::Default

Inherits:
Object show all
Includes:
Behavior, Memoization
Defined in:
lib/pry/config/default.rb

Constant Summary

Constants included from Memoization

Memoization::MEMOIZED_METHODS

Constants included from Behavior

Behavior::ASSIGNMENT, Behavior::INSPECT_REGEXP, Behavior::NODUP, Behavior::ReservedKeyError

Instance Method Summary collapse

Methods included from Memoization

included, #memoized_methods

Methods included from Behavior

#==, #[], #[]=, #__clip_inspect, #__dup, #__push, #__remove, #__try_convert_to_hash, #clear, #default, #eager_load!, #forget, included, #inspect, #key?, #keys, #last_default, #merge!, #method_missing, #pretty_print, #respond_to_missing?, #to_hash

Constructor Details

#initializeDefault

Returns a new instance of Default



133
134
135
# File 'lib/pry/config/default.rb', line 133

def initialize
  super(nil)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pry::Config::Behavior

Instance Method Details

#lazy_readlineObject (private)



138
139
140
141
142
143
144
145
146
147
148
# File 'lib/pry/config/default.rb', line 138

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