Sha256: 067f6915e90db24f16f61ce2d2b824051083c30e7d407d67abf6b54011c21bc4

Contents?: true

Size: 691 Bytes

Versions: 2

Compression:

Stored size: 691 Bytes

Contents

# frozen_string_literal: true

module RubyJard
  module Commands
    # Command used to continue program execution to the next line.
    class NextCommand < Pry::ClassCommand
      group 'RubyJard'
      description 'Next into the execution of the current line'

      match 'next'

      banner <<-BANNER
      Usage: next

      Continue program execution to the next line. If the current frame reaches the end, it continue the next line of upper frame.

      Examples:
        next
      BANNER

      def process
        RubyJard::ControlFlow.dispatch(:next)
      end
    end
  end
end

Pry::Commands.add_command(RubyJard::Commands::NextCommand)
Pry::Commands.alias_command 'n', 'next'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_jard-0.2.2 lib/ruby_jard/commands/next_command.rb
ruby_jard-0.2.1 lib/ruby_jard/commands/next_command.rb