Class: SporkDebugger

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/spork/ext/ruby-debug.rb

Overview

Experimental! No automated tests are checking this, use at your own risk!

Defined Under Namespace

Modules: NetworkHelpers Classes: EachRunState, PreloadState

Constant Summary collapse

DEFAULT_PORT =
10_123
HOST =
'127.0.0.1'

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSporkDebugger

Returns a new instance of SporkDebugger.



22
23
24
25
26
27
# File 'lib/spork/ext/ruby-debug.rb', line 22

def initialize
  @state = SporkDebugger::PreloadState.new
  Spork.send(:each_run_procs).unshift(lambda do
    @state = @state.transition_to_each_run_state
  end)
end

Class Attribute Details

.instanceObject (readonly)

Returns the value of attribute instance.



16
17
18
# File 'lib/spork/ext/ruby-debug.rb', line 16

def instance
  @instance
end

Instance Attribute Details

#stateObject (readonly)

Returns the value of attribute state.



13
14
15
# File 'lib/spork/ext/ruby-debug.rb', line 13

def state
  @state
end

Class Method Details

.runObject



17
18
19
# File 'lib/spork/ext/ruby-debug.rb', line 17

def run
  @instance = new
end