1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
pry--pry/lib/pry/config.rb

25 lines
570 B
Ruby
Raw Normal View History

class Pry::Config
require_relative 'config/behavior'
require_relative 'config/default'
require_relative 'config/convenience'
include Pry::Config::Behavior
2011-05-28 04:43:32 -04:00
def self.shortcuts
Convenience::SHORTCUTS
end
#
# 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