Class: Breakpoint::DRbService
- Inherits:
-
Object
- Object
- Breakpoint::DRbService
- Includes:
- DRbUndumped
- Defined in:
- lib/breakpoint.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#collision_handler ⇒ Object
Returns the value of attribute collision_handler.
-
#eval_handler ⇒ Object
Returns the value of attribute eval_handler.
-
#handler ⇒ Object
Returns the value of attribute handler.
Instance Method Summary collapse
- #add_breakpoint(context, message) ⇒ Object
- #collision ⇒ Object
-
#initialize ⇒ DRbService
constructor
A new instance of DRbService.
- #ping ⇒ Object
Constructor Details
#initialize ⇒ DRbService
Returns a new instance of DRbService.
310 311 312 313 314 315 316 317 318 319 |
# File 'lib/breakpoint.rb', line 310 def initialize @handler = @eval_handler = @collision_handler = nil begin IRB.instance_eval { @CONF[:RC] = true } IRB.init_config(nil) IRB.run_config rescue Exception end end |
Instance Attribute Details
#collision_handler ⇒ Object
Returns the value of attribute collision_handler.
343 344 345 |
# File 'lib/breakpoint.rb', line 343 def collision_handler @collision_handler end |
#eval_handler ⇒ Object
Returns the value of attribute eval_handler.
343 344 345 |
# File 'lib/breakpoint.rb', line 343 def eval_handler @eval_handler end |
#handler ⇒ Object
Returns the value of attribute handler.
343 344 345 |
# File 'lib/breakpoint.rb', line 343 def handler @handler end |
Instance Method Details
#add_breakpoint(context, message) ⇒ Object
331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/breakpoint.rb', line 331 def add_breakpoint(context, ) workspace = IRB::WorkSpace.new(context) workspace.extend(DRbUndumped) sleep(0.5) until @handler @handler.untaint @handler.call(workspace, ) rescue Errno::ECONNREFUSED, DRb::DRbConnError raise if Breakpoint.use_drb? end |
#collision ⇒ Object
321 322 323 324 325 326 327 |
# File 'lib/breakpoint.rb', line 321 def collision sleep(0.5) until @collision_handler @collision_handler.untaint @collision_handler.call end |
#ping ⇒ Object
329 |
# File 'lib/breakpoint.rb', line 329 def ping() end |