Class: EY::Backup::Logger
- Inherits:
-
Object
- Object
- EY::Backup::Logger
- Extended by:
- Forwardable
- Defined in:
- lib/ey_backup/logger.rb
Instance Attribute Summary collapse
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(stdout = $stdout, stderr = $stderr) ⇒ Logger
constructor
A new instance of Logger.
- #say(msg, newline = true) ⇒ Object
Constructor Details
#initialize(stdout = $stdout, stderr = $stderr) ⇒ Logger
20 21 22 |
# File 'lib/ey_backup/logger.rb', line 20 def initialize(stdout = $stdout, stderr = $stderr) @stdout, @stderr = stdout, stderr end |
Instance Attribute Details
#stderr ⇒ Object
Returns the value of attribute stderr.
6 7 8 |
# File 'lib/ey_backup/logger.rb', line 6 def stderr @stderr end |
#stdout ⇒ Object
Returns the value of attribute stdout.
6 7 8 |
# File 'lib/ey_backup/logger.rb', line 6 def stdout @stdout end |
Class Method Details
.quiet ⇒ Object
16 17 18 |
# File 'lib/ey_backup/logger.rb', line 16 def self.quiet new(StringIO.new) end |
Instance Method Details
#say(msg, newline = true) ⇒ Object
24 25 26 |
# File 'lib/ey_backup/logger.rb', line 24 def say(msg, newline = true) newline ? info(msg) : stdout.print(msg) end |