Class: Documented::Tracer
- Inherits:
-
Object
- Object
- Documented::Tracer
- Defined in:
- lib/tracer.rb
Instance Attribute Summary collapse
-
#sequence ⇒ Object
readonly
Returns the value of attribute sequence.
Instance Method Summary collapse
- #disable ⇒ Object
- #enable ⇒ Object
-
#initialize(blocklist) ⇒ Tracer
constructor
A new instance of Tracer.
Constructor Details
#initialize(blocklist) ⇒ Tracer
Returns a new instance of Tracer.
11 12 13 14 |
# File 'lib/tracer.rb', line 11 def initialize(blocklist) @blocklist = blocklist @trace_point = create_trace_point() end |
Instance Attribute Details
#sequence ⇒ Object (readonly)
Returns the value of attribute sequence.
9 10 11 |
# File 'lib/tracer.rb', line 9 def sequence @sequence end |
Instance Method Details
#disable ⇒ Object
21 22 23 24 |
# File 'lib/tracer.rb', line 21 def disable @trace_point.disable Documented.add_sequence(@sequence) end |
#enable ⇒ Object
16 17 18 19 |
# File 'lib/tracer.rb', line 16 def enable @sequence = [] @trace_point.enable end |