Class: Ramaze::SpecLogger

Inherits:
Object
  • Object
show all
Includes:
Enumerable, Logging
Defined in:
lib/ramaze/spec/helper/pretty_output.rb

Overview

Special Logger, stores everything in its history

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from Logging

#debug, #debug?, #dev, #error, #info, #shutdown, #tag_log, #warn

Constructor Details

- (SpecLogger) initialize

Create new history



62
63
64
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 62

def initialize
  @history = []
end

Instance Attribute Details

- (Object) history

Returns the value of attribute history



59
60
61
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 59

def history
  @history
end

Instance Method Details

- (Object) each

Yield the history



67
68
69
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 67

def each
  @history.each{|e| yield(e) }
end

- (Object) log(tag, str)

general log



72
73
74
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 72

def log(tag, str)
  @history << [tag, str]
end