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.
78 79 80 81 82 |
# File 'lib/backup/logger/logfile.rb', line 78 def initialize() = @logfile = setup_logfile truncate! end |
Instance Method Details
#log(message) ⇒ Object
84 85 86 |
# File 'lib/backup/logger/logfile.rb', line 84 def log() File.open(@logfile, "a") { |f| f.puts .formatted_lines } end |