Class: Indocker::TestLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/indocker/utils/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ TestLogger

Returns a new instance of TestLogger.



19
20
21
22
# File 'lib/indocker/utils/logger.rb', line 19

def initialize
  @strio = StringIO.new
  super(@strio)
end

Instance Attribute Details

#strio ⇒ Object (readonly)

Returns the value of attribute strio.



17
18
19
# File 'lib/indocker/utils/logger.rb', line 17

def strio
  @strio
end

Instance Method Details

#clear ⇒ Object



28
29
30
# File 'lib/indocker/utils/logger.rb', line 28

def clear
  @strio.string.clear
end

#messages ⇒ Object



24
25
26
# File 'lib/indocker/utils/logger.rb', line 24

def messages
  @strio.string.split("\n")
end