Class: Macros4Cuke::Formatter::ToTrace
- Inherits:
-
Object
- Object
- Macros4Cuke::Formatter::ToTrace
- Defined in:
- lib/macros4cuke/formatter/to-trace.rb
Overview
A macro-step formatter that outputs in the given IO the formatting events. Can be useful in tracing the visit sequence inside a given macro-step collection.
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
The IO where the formatter's output will be written to.
Instance Method Summary collapse
-
#implements ⇒ Object
Tell which notifications the formatter subscribes to.
-
#initialize(anIO) ⇒ ToTrace
constructor
A new instance of ToTrace.
- #on_collection(aLevel, aMacroCollection) ⇒ Object
- #on_collection_end(aLevel) ⇒ Object
- #on_comment(aLevel, aComment) ⇒ Object
- #on_eol(aLevel) ⇒ Object
- #on_phrase(aLevel, aPhraseText, useTable) ⇒ Object
- #on_placeholder(aLevel, aPlaceHolderName) ⇒ Object
- #on_renderer(aLevel, aRenderer) ⇒ Object
- #on_renderer_end(aLevel) ⇒ Object
- #on_section(aLevel, aSectionName) ⇒ Object
- #on_section_end(aLevel) ⇒ Object
- #on_source(aLevel, aSourceText) ⇒ Object
- #on_static_text(aLevel, aStaticText) ⇒ Object
- #on_step(aLevel, aMacroStep) ⇒ Object
- #on_step_end(aLevel) ⇒ Object
Constructor Details
#initialize(anIO) ⇒ ToTrace
Returns a new instance of ToTrace.
18 19 20 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 18 def initialize(anIO) @io = anIO end |
Instance Attribute Details
#io ⇒ Object (readonly)
The IO where the formatter's output will be written to.
15 16 17 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 15 def io @io end |
Instance Method Details
#implements ⇒ Object
Tell which notifications the formatter subscribes to.
25 26 27 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 25 def implements() return Formatter::AllNotifications end |
#on_collection(aLevel, aMacroCollection) ⇒ Object
29 30 31 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 29 def on_collection(aLevel, aMacroCollection) trace_event(aLevel, __method__) end |
#on_collection_end(aLevel) ⇒ Object
33 34 35 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 33 def on_collection_end(aLevel) trace_event(aLevel, __method__) end |
#on_comment(aLevel, aComment) ⇒ Object
65 66 67 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 65 def on_comment(aLevel, aComment) trace_event(aLevel, __method__) end |
#on_eol(aLevel) ⇒ Object
69 70 71 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 69 def on_eol(aLevel) trace_event(aLevel, __method__) end |
#on_phrase(aLevel, aPhraseText, useTable) ⇒ Object
45 46 47 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 45 def on_phrase(aLevel, aPhraseText, useTable) trace_event(aLevel, __method__) end |
#on_placeholder(aLevel, aPlaceHolderName) ⇒ Object
73 74 75 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 73 def on_placeholder(aLevel, aPlaceHolderName) trace_event(aLevel, __method__) end |
#on_renderer(aLevel, aRenderer) ⇒ Object
49 50 51 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 49 def on_renderer(aLevel, aRenderer) trace_event(aLevel, __method__) end |
#on_renderer_end(aLevel) ⇒ Object
53 54 55 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 53 def on_renderer_end(aLevel) trace_event(aLevel, __method__) end |
#on_section(aLevel, aSectionName) ⇒ Object
77 78 79 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 77 def on_section(aLevel, aSectionName) trace_event(aLevel, __method__) end |
#on_section_end(aLevel) ⇒ Object
81 82 83 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 81 def on_section_end(aLevel) trace_event(aLevel, __method__) end |
#on_source(aLevel, aSourceText) ⇒ Object
57 58 59 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 57 def on_source(aLevel, aSourceText) trace_event(aLevel, __method__) end |
#on_static_text(aLevel, aStaticText) ⇒ Object
61 62 63 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 61 def on_static_text(aLevel, aStaticText) trace_event(aLevel, __method__) end |
#on_step(aLevel, aMacroStep) ⇒ Object
37 38 39 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 37 def on_step(aLevel, aMacroStep) trace_event(aLevel, __method__) end |
#on_step_end(aLevel) ⇒ Object
41 42 43 |
# File 'lib/macros4cuke/formatter/to-trace.rb', line 41 def on_step_end(aLevel) trace_event(aLevel, __method__) end |