Sha256: abff0112f2ad83f7a38452ed5c8ec13d86e8cfeeab29e5c0c15d457ad2337964

Contents?: true

Size: 497 Bytes

Versions: 16

Compression:

Stored size: 497 Bytes

Contents

class PryMoves::Goto < PryMoves::TraceCommand

  def init(binding_)
    @goto_line = @command[:param].to_i
  end

  def trace(event, file, line, method, binding_)
    if @call_depth < 0 or
        @call_depth == 0 and event == 'return' and @method.within?(file, line)
      PryMoves.messages << "⚠️  Unable to reach line #{@goto_line} in current frame"
      return true
    end

    event == 'line' && @goto_line == line and
      @method[:file] == file and
      @call_depth == 0
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pry-moves-1.0.15 lib/commands/goto.rb
pry-moves-1.0.14 lib/commands/goto.rb
pry-moves-1.0.13 lib/commands/goto.rb
pry-moves-1.0.12 lib/commands/goto.rb
pry-moves-1.0.11 lib/commands/goto.rb
pry-moves-1.0.10 lib/commands/goto.rb
pry-moves-1.0.9 lib/commands/goto.rb
pry-moves-1.0.8 lib/commands/goto.rb
pry-moves-1.0.7 lib/commands/goto.rb
pry-moves-1.0.6 lib/commands/goto.rb
pry-moves-1.0.5 lib/commands/goto.rb
pry-moves-1.0.4 lib/commands/goto.rb
pry-moves-1.0.3 lib/commands/goto.rb
pry-moves-1.0.2 lib/commands/goto.rb
pry-moves-1.0.1 lib/commands/goto.rb
pry-moves-1.0.0 lib/commands/goto.rb