Sha256: 50a58504e087066bdd4b9c946c13ea211eba61647b22ffe7e5117fec468f92e1

Contents?: true

Size: 740 Bytes

Versions: 12

Compression:

Stored size: 740 Bytes

Contents

class Pry

  # The default hooks - display messages when beginning and ending Pry sessions.
  DEFAULT_HOOKS = {
    
    :before_session => proc do |out, target|
     # out.puts "Beginning Pry session for #{Pry.view_clip(target.eval('self'))}"

      # ensure we're actually in a method
      meth_name = target.eval('__method__')
      file = target.eval('__FILE__')

      # /unknown/ for rbx
      if file !~ /(\(.*\))|<.*>/ && file !~ /__unknown__/ && file != ""
        Pry.run_command "whereami 5", :output => out, :show_output => true, :context => target, :commands => Pry::Commands
      end
    end,
    
#    :after_session => proc { |out, target| out.puts "Ending Pry session for #{Pry.view_clip(target.eval('self'))}" }
  }
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pry-0.8.0pre9-i386-mswin32 lib/pry/hooks.rb
pry-0.8.0pre9-i386-mingw32 lib/pry/hooks.rb
pry-0.8.0pre9-java lib/pry/hooks.rb
pry-0.8.0pre9 lib/pry/hooks.rb
pry-0.8.0pre8 lib/pry/hooks.rb
pry-0.8.0pre8-java lib/pry/hooks.rb
pry-0.8.0pre8-i386-mswin32 lib/pry/hooks.rb
pry-0.8.0pre8-i386-mingw32 lib/pry/hooks.rb
pry-0.8.0pre7 lib/pry/hooks.rb
pry-0.8.0pre7-java lib/pry/hooks.rb
pry-0.8.0pre7-i386-mswin32 lib/pry/hooks.rb
pry-0.8.0pre7-i386-mingw32 lib/pry/hooks.rb