Class: Ra::Logger
- Inherits:
-
Object
- Object
- Ra::Logger
- Defined in:
- lib/ra/logger.rb
Overview
A logger used to make exe testing possible.
logger = Logger.new
logger.log("Greetings!")
Instance Method Summary collapse
-
#initialize(stream: $stdout) ⇒ Logger
constructor
A new instance of Logger.
- #log(message = nil) ⇒ Object
Constructor Details
#initialize(stream: $stdout) ⇒ Logger
Returns a new instance of Logger.
10 11 12 |
# File 'lib/ra/logger.rb', line 10 def initialize(stream: $stdout) @stream = stream end |
Instance Method Details
#log(message = nil) ⇒ Object
15 16 17 |
# File 'lib/ra/logger.rb', line 15 def log( = nil) @stream.puts end |