2013-12-17 12:27:42 -05:00
|
|
|
class Pry::Config
|
2014-02-01 08:52:40 -05:00
|
|
|
require_relative 'config/behavior'
|
|
|
|
require_relative 'config/default'
|
|
|
|
require_relative 'config/convenience'
|
2014-01-20 18:21:29 -05:00
|
|
|
include Pry::Config::Behavior
|
2011-05-28 04:43:32 -04:00
|
|
|
|
2013-12-17 12:27:42 -05:00
|
|
|
def self.shortcuts
|
|
|
|
Convenience::SHORTCUTS
|
|
|
|
end
|
2011-09-17 21:45:46 -04:00
|
|
|
|
2014-01-20 17:02:23 -05:00
|
|
|
#
|
|
|
|
# FIXME
|
|
|
|
# @param [Pry::Hooks] hooks
|
|
|
|
#
|
|
|
|
def hooks=(hooks)
|
|
|
|
if hooks.is_a?(Hash)
|
|
|
|
warn "Hash-based hooks are now deprecated! Use a `Pry::Hooks` object " \
|
|
|
|
"instead! http://rubydoc.info/github/pry/pry/master/Pry/Hooks"
|
|
|
|
self["hooks"] = Pry::Hooks.from_hash(hooks)
|
|
|
|
else
|
|
|
|
self["hooks"] = hooks
|
|
|
|
end
|
|
|
|
end
|
2011-05-28 04:43:32 -04:00
|
|
|
end
|