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.



16
17
18
# File 'lib/macros4cuke/formatter/to-trace.rb', line 16

def initialize(anIO)
  @io = anIO
end

Instance Attribute Details

#ioObject (readonly)

The IO where the formatter's output will be written to.



13
14
15
# File 'lib/macros4cuke/formatter/to-trace.rb', line 13

def io
  @io
end

Instance Method Details

#implementsObject

Tell which notifications the formatter subscribes to.



21
22
23
# File 'lib/macros4cuke/formatter/to-trace.rb', line 21

def implements()
  return Formatter::AllNotifications
end

#on_collection(aLevel, _) ⇒ Object



25
26
27
# File 'lib/macros4cuke/formatter/to-trace.rb', line 25

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

#on_collection_end(aLevel) ⇒ Object



29
30
31
# File 'lib/macros4cuke/formatter/to-trace.rb', line 29

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

#on_comment(aLevel, _) ⇒ Object



61
62
63
# File 'lib/macros4cuke/formatter/to-trace.rb', line 61

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

#on_eol(aLevel) ⇒ Object



65
66
67
# File 'lib/macros4cuke/formatter/to-trace.rb', line 65

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

#on_phrase(aLevel, _, _) ⇒ Object



41
42
43
# File 'lib/macros4cuke/formatter/to-trace.rb', line 41

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

#on_placeholder(aLevel, _) ⇒ Object



69
70
71
# File 'lib/macros4cuke/formatter/to-trace.rb', line 69

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

#on_renderer(aLevel, _) ⇒ Object



45
46
47
# File 'lib/macros4cuke/formatter/to-trace.rb', line 45

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

#on_renderer_end(aLevel) ⇒ Object



49
50
51
# File 'lib/macros4cuke/formatter/to-trace.rb', line 49

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

#on_section(aLevel, _) ⇒ Object



73
74
75
# File 'lib/macros4cuke/formatter/to-trace.rb', line 73

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

#on_section_end(aLevel) ⇒ Object



77
78
79
# File 'lib/macros4cuke/formatter/to-trace.rb', line 77

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

#on_source(aLevel, _) ⇒ Object



53
54
55
# File 'lib/macros4cuke/formatter/to-trace.rb', line 53

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

#on_static_text(aLevel, _) ⇒ Object



57
58
59
# File 'lib/macros4cuke/formatter/to-trace.rb', line 57

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

#on_step(aLevel, _) ⇒ Object



33
34
35
# File 'lib/macros4cuke/formatter/to-trace.rb', line 33

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

#on_step_end(aLevel) ⇒ Object



37
38
39
# File 'lib/macros4cuke/formatter/to-trace.rb', line 37

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