Class: Macros4Cuke::Formatter::ToTrace

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#ioObject (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

#implementsObject

Tell which notifications the formatter subscribes to.



23
24
25
# File 'lib/macros4cuke/formatter/to-trace.rb', line 23

def implements()
  return Formatter::AllNotifications
end

#on_collection(aLevel, _) ⇒ Object



27
28
29
# File 'lib/macros4cuke/formatter/to-trace.rb', line 27

def on_collection(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_collection_end(aLevel) ⇒ Object



31
32
33
# File 'lib/macros4cuke/formatter/to-trace.rb', line 31

def on_collection_end(aLevel)
  trace_event(aLevel, __method__)
end

#on_comment(aLevel, _) ⇒ Object



63
64
65
# File 'lib/macros4cuke/formatter/to-trace.rb', line 63

def on_comment(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_eol(aLevel) ⇒ Object



67
68
69
# File 'lib/macros4cuke/formatter/to-trace.rb', line 67

def on_eol(aLevel)
  trace_event(aLevel, __method__)
end

#on_phrase(aLevel, _, _) ⇒ Object



43
44
45
# File 'lib/macros4cuke/formatter/to-trace.rb', line 43

def on_phrase(aLevel, _, _)
  trace_event(aLevel, __method__)
end

#on_placeholder(aLevel, _) ⇒ Object



71
72
73
# File 'lib/macros4cuke/formatter/to-trace.rb', line 71

def on_placeholder(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_renderer(aLevel, _) ⇒ Object



47
48
49
# File 'lib/macros4cuke/formatter/to-trace.rb', line 47

def on_renderer(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_renderer_end(aLevel) ⇒ Object



51
52
53
# File 'lib/macros4cuke/formatter/to-trace.rb', line 51

def on_renderer_end(aLevel)
  trace_event(aLevel, __method__)
end

#on_section(aLevel, _) ⇒ Object



75
76
77
# File 'lib/macros4cuke/formatter/to-trace.rb', line 75

def on_section(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_section_end(aLevel) ⇒ Object



79
80
81
# File 'lib/macros4cuke/formatter/to-trace.rb', line 79

def on_section_end(aLevel)
  trace_event(aLevel, __method__)
end

#on_source(aLevel, _) ⇒ Object



55
56
57
# File 'lib/macros4cuke/formatter/to-trace.rb', line 55

def on_source(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_static_text(aLevel, _) ⇒ Object



59
60
61
# File 'lib/macros4cuke/formatter/to-trace.rb', line 59

def on_static_text(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_step(aLevel, _) ⇒ Object



35
36
37
# File 'lib/macros4cuke/formatter/to-trace.rb', line 35

def on_step(aLevel, _)
  trace_event(aLevel, __method__)
end

#on_step_end(aLevel) ⇒ Object



39
40
41
# File 'lib/macros4cuke/formatter/to-trace.rb', line 39

def on_step_end(aLevel)
  trace_event(aLevel, __method__)
end