Class: Assistor::LogFile
- Inherits:
-
Object
- Object
- Assistor::LogFile
- Extended by:
- Forwardable
- Defined in:
- lib/assistor/log_file.rb
Instance Method Summary collapse
-
#initialize(log_file) ⇒ LogFile
constructor
A new instance of LogFile.
- #reopen ⇒ Object
Constructor Details
#initialize(log_file) ⇒ LogFile
Returns a new instance of LogFile.
7 8 9 10 |
# File 'lib/assistor/log_file.rb', line 7 def initialize(log_file) @log_file = log_file @logger = Logger.new(log_file) end |
Instance Method Details
#reopen ⇒ Object
12 13 14 15 16 |
# File 'lib/assistor/log_file.rb', line 12 def reopen $stderr.reopen @log_file, 'a+' $stdout.reopen $stderr $stdout.sync = $stderr.sync = true end |