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.



79
80
81
82
# File 'lib/tdl/queue/queue_based_implementation_runner.rb', line 79

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

Instance Method Details

#end_lineObject



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

def end_line
  @logger.info @str
end

#log(auditable) ⇒ Object



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

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

  @str << text
end

#start_lineObject



84
85
86
# File 'lib/tdl/queue/queue_based_implementation_runner.rb', line 84

def start_line
  @str = ''
end