Class: Spoolprint::ServerReceipt
- Inherits:
-
Server
- Object
- Server
- Spoolprint::ServerReceipt
- Defined in:
- lib/spoolprint/server_receipt.rb
Constant Summary collapse
- ASAL_SERVER_PORT =
7776
Instance Method Summary collapse
-
#initialize(spool) ⇒ ServerReceipt
constructor
A new instance of ServerReceipt.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(spool) ⇒ ServerReceipt
Returns a new instance of ServerReceipt.
7 8 9 10 11 12 13 |
# File 'lib/spoolprint/server_receipt.rb', line 7 def initialize(spool) super(ASAL_SERVER_PORT) @spool = spool @manager = ReceiverManager.new(method(:read_driver)) @server_zone = Thread.new { server_bergulir } @bergulir = false end |
Instance Method Details
#start ⇒ Object
15 16 17 18 |
# File 'lib/spoolprint/server_receipt.rb', line 15 def start @bergulir = true @server_zone.run if @server_zone.stop? end |
#stop ⇒ Object
20 21 22 |
# File 'lib/spoolprint/server_receipt.rb', line 20 def stop @bergulir = false end |