Class: Breakpoint::DRbService
- Includes:
- DRbUndumped
- Defined in:
- lib/active_record/support/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.
281 282 283 284 285 286 |
# File 'lib/active_record/support/breakpoint.rb', line 281 def initialize @handler = @eval_handler = @collision_handler = nil IRB.instance_eval { @CONF[:RC] = true } IRB.run_config end |
Instance Attribute Details
#collision_handler ⇒ Object
Returns the value of attribute collision_handler.
305 306 307 |
# File 'lib/active_record/support/breakpoint.rb', line 305 def collision_handler @collision_handler end |
#eval_handler ⇒ Object
Returns the value of attribute eval_handler.
305 306 307 |
# File 'lib/active_record/support/breakpoint.rb', line 305 def eval_handler @eval_handler end |
#handler ⇒ Object
Returns the value of attribute handler.
305 306 307 |
# File 'lib/active_record/support/breakpoint.rb', line 305 def handler @handler end |
Instance Method Details
#add_breakpoint(context, message) ⇒ Object
296 297 298 299 300 301 302 303 |
# File 'lib/active_record/support/breakpoint.rb', line 296 def add_breakpoint(context, ) workspace = IRB::WorkSpace.new(context) workspace.extend(DRbUndumped) sleep(0.5) until @handler @handler.call(workspace, ) end |
#collision ⇒ Object
288 289 290 291 292 |
# File 'lib/active_record/support/breakpoint.rb', line 288 def collision sleep(0.5) until @collision_handler @collision_handler.call end |
#ping ⇒ Object
294 |
# File 'lib/active_record/support/breakpoint.rb', line 294 def ping() end |