Class: Narou::LoggerError

Inherits:
StringIO
  • Object
show all
Includes:
LoggerModule
Defined in:
lib/logger.rb

Instance Method Summary collapse

Methods included from LoggerModule

#capture, #initialize, #save, #silence, #silent, #silent=, #strip_color, #write_console

Instance Method Details

#tty?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/logger.rb', line 124

def tty?
  STDERR.tty?
end

#write(str) ⇒ Object



115
116
117
118
119
120
121
122
# File 'lib/logger.rb', line 115

def write(str)
  str = str.to_s
  if str.encoding == Encoding::ASCII_8BIT
    str.force_encoding(Encoding::UTF_8)
  end
  super(str)
  write_console(str, STDERR)
end