Class: Logbert::Handlers::StreamHandler
- Inherits:
-
BaseHandler
- Object
- BaseHandler
- Logbert::Handlers::StreamHandler
- Defined in:
- lib/logbert/handlers.rb
Instance Attribute Summary collapse
-
#stream ⇒ Object
Returns the value of attribute stream.
Instance Method Summary collapse
- #emit(output) ⇒ Object
-
#initialize(stream = $stderr) ⇒ StreamHandler
constructor
A new instance of StreamHandler.
Methods inherited from BaseHandler
#formatter, #formatter=, #publish
Constructor Details
#initialize(stream = $stderr) ⇒ StreamHandler
Returns a new instance of StreamHandler.
33 34 35 |
# File 'lib/logbert/handlers.rb', line 33 def initialize(stream = $stderr) @stream = stream end |
Instance Attribute Details
#stream ⇒ Object
Returns the value of attribute stream.
31 32 33 |
# File 'lib/logbert/handlers.rb', line 31 def stream @stream end |
Instance Method Details
#emit(output) ⇒ Object
37 38 39 |
# File 'lib/logbert/handlers.rb', line 37 def emit(output) @stream.puts output end |