Class: Output::Writer::DeviceSuspension
- Inherits:
-
Object
- Object
- Output::Writer::DeviceSuspension
- Includes:
- Initializer
- Defined in:
- lib/output/writer.rb
Instance Attribute Summary collapse
-
#logger_device ⇒ Object
Returns the value of attribute logger_device.
-
#writer_device ⇒ Object
Returns the value of attribute writer_device.
Instance Method Summary collapse
Instance Attribute Details
#logger_device ⇒ Object
Returns the value of attribute logger_device.
108 109 110 |
# File 'lib/output/writer.rb', line 108 def logger_device @logger_device end |
#writer_device ⇒ Object
Returns the value of attribute writer_device.
109 110 111 |
# File 'lib/output/writer.rb', line 109 def writer_device @writer_device end |
Instance Method Details
#restore ⇒ Object
113 114 115 116 117 118 |
# File 'lib/output/writer.rb', line 113 def restore unless device.nil? writer.push_device device if (writer_device) writer.add_device device if (logger_device) end end |
#suspend ⇒ Object
121 122 123 124 125 126 127 |
# File 'lib/output/writer.rb', line 121 def suspend self.logger_device = writer.logger_device? device self.writer_device = writer.device? device writer.remove_device device if logger_device writer.devices.delete device if writer_device end |