module RSpecSystem::Log

This log overlay module, provides access to the log method.

Public Instance Methods

bold(text) click to toggle source
# File lib/rspec-system/log.rb, line 66
def bold(text)
  begin
    formatter.send(:bold, text)
  rescue NameError
    ""
  end
end
color(text, color) click to toggle source
# File lib/rspec-system/log.rb, line 74
def color(text, color)
  begin
    formatter.send(:color, text, color)
  rescue NameError
    ""
  end
end
formatter() click to toggle source
# File lib/rspec-system/log.rb, line 46
def formatter
  RSpec.configuration.formatters.each do |f|
    if f.is_a? RSpecSystem::Formatter then
      return f
    end
  end
end
log() click to toggle source

Return the default Logger object.

@return [Logger] default logger object

# File lib/rspec-system/log.rb, line 40
def log
  return @logger if @logger
  @logger = Logger.new(output)
  @logger
end
output() click to toggle source
# File lib/rspec-system/log.rb, line 58
def output
  begin
    formatter.output
  rescue NameError
    NullStream.new
  end
end