Class: Backup::Logger::Logfile
- Inherits:
-
Object
- Object
- Backup::Logger::Logfile
- Defined in:
- lib/backup/logger/logfile.rb
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(options) ⇒ Logfile
constructor
A new instance of Logfile.
- #log(message) ⇒ Object
Constructor Details
#initialize(options) ⇒ Logfile
Returns a new instance of Logfile.
80 81 82 83 84 |
# File 'lib/backup/logger/logfile.rb', line 80 def initialize() @options = @logfile = setup_logfile truncate! end |
Instance Method Details
#log(message) ⇒ Object
86 87 88 |
# File 'lib/backup/logger/logfile.rb', line 86 def log() File.open(@logfile, 'a') {|f| f.puts .formatted_lines } end |