Class: ZTK::Logger::LogDevice
- Inherits:
-
Object
- Object
- ZTK::Logger::LogDevice
- Defined in:
- lib/ztk/logger.rb
Instance Attribute Summary (collapse)
-
- (Object) dev
readonly
Returns the value of attribute dev.
-
- (Object) filename
readonly
Returns the value of attribute filename.
Instance Method Summary (collapse)
- - (Object) close
-
- (LogDevice) initialize(chain)
constructor
A new instance of LogDevice.
- - (Object) write(message)
Constructor Details
- (LogDevice) initialize(chain)
Returns a new instance of LogDevice
60 61 62 63 64 |
# File 'lib/ztk/logger.rb', line 60 def initialize(chain) @chain = chain @dev = nil @filename = nil end |
Instance Attribute Details
- (Object) dev (readonly)
Returns the value of attribute dev
57 58 59 |
# File 'lib/ztk/logger.rb', line 57 def dev @dev end |
- (Object) filename (readonly)
Returns the value of attribute filename
58 59 60 |
# File 'lib/ztk/logger.rb', line 58 def filename @filename end |
Instance Method Details
- (Object) close
72 73 74 75 76 |
# File 'lib/ztk/logger.rb', line 72 def close @chain.loggers.each do |logger| logger.instance_variable_get(:@logdev).close end end |
- (Object) write(message)
66 67 68 69 70 |
# File 'lib/ztk/logger.rb', line 66 def write() @chain.loggers.each do |logger| logger << end end |