Sha256: 196cab45c4f31e786824d50913253896f9d3e029e7a16f03fff34a8d414b8414

Contents?: true

Size: 919 Bytes

Versions: 10

Compression:

Stored size: 919 Bytes

Contents

require 'forwardable'

module Byebug
  class Processor
    attr_accessor :interface

    extend Forwardable
    def_delegators :@interface, :errmsg, :puts

    def initialize(interface)
      @interface = interface
    end

    def without_exceptions
      yield
    rescue
      nil
    end

    def self.load_commands
      Dir.glob(File.expand_path('../commands/*.rb', __FILE__)).each do |file|
        require file
      end
    end

    def self.load_settings
      Dir.glob(File.expand_path('../settings/*.rb', __FILE__)).each do |file|
        require file
      end

      Byebug.constants.grep(/[a-z]Setting/).map do |name|
        setting = Byebug.const_get(name).new
        Byebug::Setting.settings[setting.to_sym] = setting
      end
    end
  end

  Processor.load_commands
  Processor.load_settings
end

require 'byebug/processors/command_processor'
require 'byebug/processors/control_command_processor'

Version data entries

10 entries across 9 versions & 3 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/byebug-4.0.5/lib/byebug/processor.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/byebug-4.0.5/lib/byebug/processor.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/byebug-5.0.0/lib/byebug/processor.rb
byebug-5.0.0 lib/byebug/processor.rb
byebug-4.0.5 lib/byebug/processor.rb
byebug-4.0.4 lib/byebug/processor.rb
byebug-4.0.3 lib/byebug/processor.rb
byebug-4.0.2 lib/byebug/processor.rb
byebug-4.0.1 lib/byebug/processor.rb
byebug-4.0.0 lib/byebug/processor.rb