2013-12-17 18:27:42 +01:00
|
|
|
class Pry::Config
|
2014-02-01 14:52:40 +01:00
|
|
|
require_relative 'config/behavior'
|
|
|
|
require_relative 'config/default'
|
|
|
|
require_relative 'config/convenience'
|
2014-01-21 00:21:29 +01:00
|
|
|
include Pry::Config::Behavior
|
2011-05-28 20:43:32 +12:00
|
|
|
|
2013-12-17 18:27:42 +01:00
|
|
|
def self.shortcuts
|
|
|
|
Convenience::SHORTCUTS
|
|
|
|
end
|
2011-09-18 09:45:46 +08:00
|
|
|
|
2014-01-20 23:02:23 +01: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 20:43:32 +12:00
|
|
|
end
|