Class: Ramaze::SpecLogger
- Includes:
- Enumerable, Logging
- Defined in:
- lib/ramaze/spec/helper/pretty_output.rb
Overview
Special Logger, stores everything in its history
Instance Attribute Summary collapse
-
#history ⇒ Object
Returns the value of attribute history.
Instance Method Summary collapse
-
#each ⇒ Object
Yield the history.
-
#initialize ⇒ SpecLogger
constructor
Create new history.
-
#log(tag, str) ⇒ Object
general log.
Methods included from Logging
#debug, #debug?, #dev, #error, #info, #shutdown, #tag_log, #warn
Constructor Details
#initialize ⇒ SpecLogger
Create new history
62 63 64 |
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 62 def initialize @history = [] end |
Instance Attribute Details
#history ⇒ Object
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
#each ⇒ Object
Yield the history
67 68 69 |
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 67 def each @history.each{|e| yield(e) } end |
#log(tag, str) ⇒ Object
general log
72 73 74 |
# File 'lib/ramaze/spec/helper/pretty_output.rb', line 72 def log(tag, str) @history << [tag, str] end |