Class: ChupaText::CaptureLogger
- Inherits:
-
Object
- Object
- ChupaText::CaptureLogger
- Defined in:
- lib/chupa-text/capture-logger.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#debug(message = nil) ⇒ Object
-
#error(message = nil) ⇒ Object
-
#fatal(message = nil) ⇒ Object
-
#info(message = nil) ⇒ Object
-
#initialize(output) ⇒ CaptureLogger
constructor
A new instance of CaptureLogger.
-
#warn(message = nil) ⇒ Object
Constructor Details
#initialize(output) ⇒ CaptureLogger
Returns a new instance of CaptureLogger.
33 34 35 |
# File 'lib/chupa-text/capture-logger.rb', line 33 def initialize(output) @output = output end |
Class Method Details
Instance Method Details
#debug(message = nil) ⇒ Object
37 38 39 |
# File 'lib/chupa-text/capture-logger.rb', line 37 def debug(=nil) @output << [:debu, || yield] end |
#error(message = nil) ⇒ Object
49 50 51 |
# File 'lib/chupa-text/capture-logger.rb', line 49 def error(=nil) @output << [:error, || yield] end |
#fatal(message = nil) ⇒ Object
53 54 55 |
# File 'lib/chupa-text/capture-logger.rb', line 53 def fatal(=nil) @output << [:fatal, || yield] end |
#info(message = nil) ⇒ Object
41 42 43 |
# File 'lib/chupa-text/capture-logger.rb', line 41 def info(=nil) @output << [:info, || yield] end |
#warn(message = nil) ⇒ Object
45 46 47 |
# File 'lib/chupa-text/capture-logger.rb', line 45 def warn(=nil) @output << [:warn, || yield] end |