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.
106 107 108 |
# File 'lib/output/writer.rb', line 106 def logger_device @logger_device end |
#writer_device ⇒ Object
Returns the value of attribute writer_device.
107 108 109 |
# File 'lib/output/writer.rb', line 107 def writer_device @writer_device end |
Instance Method Details
#restore ⇒ Object
111 112 113 114 115 116 |
# File 'lib/output/writer.rb', line 111 def restore unless device.nil? writer.push_device device if (writer_device) writer.add_device device if (logger_device) end end |
#suspend ⇒ Object
119 120 121 122 123 124 125 |
# File 'lib/output/writer.rb', line 119 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 |