Sha256: 7b8b30eb66bc33096622481d6772288abf8db3ecbc64df39bc76eaa2983fa14e

Contents?: true

Size: 942 Bytes

Versions: 26

Compression:

Stored size: 942 Bytes

Contents

module Byebug
  #
  # Reopens the +info+ command to define the +display+ subcommand
  #
  class InfoCommand < Command
    #
    # Information about display expressions
    #
    class DisplayCommand < Command
      self.allow_in_post_mortem = true

      def self.regexp
        /^\s* d(?:isplay)? \s*$/x
      end

      def self.description
        <<-EOD
          inf[o] d[display]

          #{short_description}
        EOD
      end

      def self.short_description
        'List of expressions to display when program stops'
      end

      def execute
        unless Byebug.displays.find { |d| d[0] }
          return puts('There are no auto-display expressions now.')
        end

        puts 'Auto-display expressions now in effect:'
        puts 'Num Enb Expression'

        Byebug.displays.each_with_index do |d, i|
          puts(format('%3d: %s  %s', i + 1, d[0] ? 'y' : 'n', d[1]))
        end
      end
    end
  end
end

Version data entries

26 entries across 25 versions & 3 rubygems

Version Path
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/byebug-9.1.0/lib/byebug/commands/info/display.rb
tdiary-5.0.6 vendor/bundle/gems/byebug-9.1.0/lib/byebug/commands/info/display.rb
byebug-9.1.0 lib/byebug/commands/info/display.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/info/display.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/info/display.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/commands/info/display.rb
byebug-9.0.6 lib/byebug/commands/info/display.rb
byebug-9.0.5 lib/byebug/commands/info/display.rb
byebug-9.0.4 lib/byebug/commands/info/display.rb
byebug-9.0.3 lib/byebug/commands/info/display.rb
byebug-9.0.2 lib/byebug/commands/info/display.rb
byebug-9.0.1 lib/byebug/commands/info/display.rb
byebug-9.0.0 lib/byebug/commands/info/display.rb
byebug-8.2.5 lib/byebug/commands/info/display.rb
byebug-8.2.4 lib/byebug/commands/info/display.rb
byebug-8.2.3 lib/byebug/commands/info/display.rb
byebug-8.2.2 lib/byebug/commands/info/display.rb
byebug-8.2.1 lib/byebug/commands/info/display.rb
byebug-8.2.0 lib/byebug/commands/info/display.rb
byebug-8.1.0 lib/byebug/commands/info/display.rb