Class: AuditStream

Inherits:
Object
  • Object
show all
Defined in:
lib/tdl/queue/queue_based_implementation_runner.rb

Instance Method Summary collapse

Constructor Details

#initializeAuditStream

Returns a new instance of AuditStream.



92
93
94
95
# File 'lib/tdl/queue/queue_based_implementation_runner.rb', line 92

def initialize
  @logger = Logging.logger[self]
  start_line
end

Instance Method Details

#end_lineObject



110
111
112
# File 'lib/tdl/queue/queue_based_implementation_runner.rb', line 110

def end_line
  @logger.info @str
end

#log(auditable) ⇒ Object



101
102
103
104
105
106
107
108
# File 'lib/tdl/queue/queue_based_implementation_runner.rb', line 101

def log(auditable)
  text = auditable.audit_text
  if not text.empty? and @str.length > 0
    @str << ', '
  end

  @str << text
end

#start_lineObject



97
98
99
# File 'lib/tdl/queue/queue_based_implementation_runner.rb', line 97

def start_line
  @str = ''
end