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.



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

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

Instance Method Details

#end_lineObject



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

def end_line
  @logger.info @str
end

#log(auditable) ⇒ Object



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

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

  @str << text
end

#start_lineObject



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

def start_line
  @str = ''
end