Class: Rhino::Logger
- Inherits:
-
Object
- Object
- Rhino::Logger
- Defined in:
- lib/rhino/logger.rb
Overview
Instance Attribute Summary collapse
-
#stream ⇒ Object
Returns the value of attribute stream.
Instance Method Summary collapse
-
#initialize(stream = STDOUT) ⇒ Logger
constructor
A new instance of Logger.
- #log(message) ⇒ Object
Constructor Details
#initialize(stream = STDOUT) ⇒ Logger
Returns a new instance of Logger.
12 13 14 |
# File 'lib/rhino/logger.rb', line 12 def initialize(stream = STDOUT) self.stream = stream end |
Instance Attribute Details
#stream ⇒ Object
Returns the value of attribute stream.
10 11 12 |
# File 'lib/rhino/logger.rb', line 10 def stream @stream end |
Instance Method Details
#log(message) ⇒ Object
16 17 18 |
# File 'lib/rhino/logger.rb', line 16 def log() self.stream.puts end |