Module: PryDebug::ConditionalBreakpoint
- Included in:
- LineBreakpoint, MethodBreakpoint
- Defined in:
- lib/pry_debug/conditional_breakpoint.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
Instance Method Summary collapse
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
3 4 5 |
# File 'lib/pry_debug/conditional_breakpoint.rb', line 3 def condition @condition end |
Instance Method Details
#is_at?(binding) ⇒ Boolean
5 6 7 8 9 |
# File 'lib/pry_debug/conditional_breakpoint.rb', line 5 def is_at?(binding) condition ? binding.eval(condition) : true rescue Exception # error in the code false end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/pry_debug/conditional_breakpoint.rb', line 11 def to_s condition ? " (if #{condition})" : "" end |