Sha256: 636fbd24d728d5e1103294af4ecc33cd4d2ef8f0c7656cefbb01c89825c54f8f

Contents?: true

Size: 580 Bytes

Versions: 2

Compression:

Stored size: 580 Bytes

Contents

# frozen_string_literal: true

module RubyJard
  module Commands
    # Command used to exit program execution.
    class ExitCommand < Pry::ClassCommand
      group 'RubyJard'
      description 'Exit program execution.'

      match 'exit'

      banner <<-BANNER
      Usage: exit
      Examples:
        exit

      Exit program execution. The program will stop at the next breakpoint, or run until it finishes.
      BANNER

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

Pry::Commands.add_command(RubyJard::Commands::ExitCommand)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_jard-0.3.0 lib/ruby_jard/commands/exit_command.rb
ruby_jard-0.2.3 lib/ruby_jard/commands/exit_command.rb