Sha256: a51306b9fdbabb98c2478ef866cf9c203e8fa021099055fc49d4c748456c085c

Contents?: true

Size: 441 Bytes

Versions: 23

Compression:

Stored size: 441 Bytes

Contents

require 'byebug/setting'
require 'byebug/commands/pry'

module Byebug
  #
  # Setting for automatically invoking Pry on every stop.
  #
  class AutoprySetting < Setting
    DEFAULT = 0

    def initialize
      PryCommand.always_run = DEFAULT
    end

    def banner
      'Invoke Pry on every stop'
    end

    def value=(v)
      PryCommand.always_run = v ? 1 : 0
    end

    def value
      PryCommand.always_run == 1
    end
  end
end

Version data entries

23 entries across 22 versions & 3 rubygems

Version Path
byebug-8.0.1 lib/byebug/settings/autopry.rb
byebug-8.0.0 lib/byebug/settings/autopry.rb
byebug-7.0.0 lib/byebug/settings/autopry.rb