Class: RSpecSystem::Log::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec-system/log.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ Logger

Returns a new instance of Logger.



8
9
10
# File 'lib/rspec-system/log.rb', line 8

def initialize(io)
  @io = io
end

Instance Attribute Details

#ioObject

Returns the value of attribute io.



6
7
8
# File 'lib/rspec-system/log.rb', line 6

def io
  @io
end

Instance Method Details

#debug(text) ⇒ Object



12
13
14
# File 'lib/rspec-system/log.rb', line 12

def debug(text)
  io << bold(color('Debug: ', :blue)) << text << "\n"
end

#error(text) ⇒ Object



32
33
34
# File 'lib/rspec-system/log.rb', line 32

def error(text)
  io << 'Error: ' << text << "\n"
end

#fatal(text) ⇒ Object



24
25
26
# File 'lib/rspec-system/log.rb', line 24

def fatal(text)
  io << 'Fatal: ' << text << "\n"
end

#info(text) ⇒ Object



16
17
18
# File 'lib/rspec-system/log.rb', line 16

def info(text)
  io << bold('Info: ') << text << "\n"
end

#unknown(text) ⇒ Object



28
29
30
# File 'lib/rspec-system/log.rb', line 28

def unknown(text)
  io << 'Unknown: ' << text << "\n"
end

#warn(text) ⇒ Object



20
21
22
# File 'lib/rspec-system/log.rb', line 20

def warn(text)
  io << 'Warn: ' << text << "\n"
end