Class: Byebug::Processor

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/byebug/processor.rb

Direct Known Subclasses

CommandProcessor, ControlCommandProcessor

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(interface) ⇒ Processor

Returns a new instance of Processor.


10
11
12
# File 'lib/byebug/processor.rb', line 10

def initialize(interface)
  @interface = interface
end

Instance Attribute Details

#interfaceObject

Returns the value of attribute interface


5
6
7
# File 'lib/byebug/processor.rb', line 5

def interface
  @interface
end

Class Method Details

.load_commandsObject


20
21
22
23
24
# File 'lib/byebug/processor.rb', line 20

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

.load_settingsObject


26
27
28
29
30
31
32
33
34
35
# File 'lib/byebug/processor.rb', line 26

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

Instance Method Details

#without_exceptionsObject


14
15
16
17
18
# File 'lib/byebug/processor.rb', line 14

def without_exceptions
  yield
rescue
  nil
end