Class: Tomo::Logger::TaggedIO

Inherits:
Object
  • Object
show all
Includes:
Colors
Defined in:
lib/tomo/logger/tagged_io.rb

Instance Method Summary collapse

Methods included from Colors

enabled?

Constructor Details

#initialize(io) ⇒ TaggedIO

Returns a new instance of TaggedIO.



8
9
10
# File 'lib/tomo/logger/tagged_io.rb', line 8

def initialize(io)
  @io = io
end

Instance Method Details

#puts(str) ⇒ Object



12
13
14
# File 'lib/tomo/logger/tagged_io.rb', line 12

def puts(str)
  io.puts(str.to_s.gsub(/^/, prefix))
end