Edited at

gem開発で$LOAD_PATHにlibとかspecとか入れたい時のpryrc

More than 3 years have passed since last update.


.pryrc

Pry.config.hooks.add_hook(:before_session, :add_load_path) do

%w(lib spec test)
.map { |dir| File.expand_path("../#{dir}", __FILE__) }
.each { |lib| $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) }
end

Pry version 0.10.1 on Ruby 2.2.2