Class: Pronto::Logger
- Inherits:
-
Object
- Object
- Pronto::Logger
- Defined in:
- lib/pronto/logger.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(out) ⇒ Logger
constructor
A new instance of Logger.
- #log(*args) ⇒ Object
Constructor Details
#initialize(out) ⇒ Logger
Returns a new instance of Logger.
8 9 10 |
# File 'lib/pronto/logger.rb', line 8 def initialize(out) @out = out end |
Class Method Details
.silent ⇒ Object
3 4 5 6 |
# File 'lib/pronto/logger.rb', line 3 def self.silent null = File.open(File::NULL, 'w') new(null) end |
Instance Method Details
#log(*args) ⇒ Object
12 13 14 |
# File 'lib/pronto/logger.rb', line 12 def log(*args) @out.puts(*args) end |