Class: Spoolprint::ReceiptPrintEasy
- Inherits:
-
Escpos::Printer
- Object
- Escpos::Printer
- Spoolprint::ReceiptPrintEasy
- Defined in:
- lib/spoolprint.rb
Instance Attribute Summary collapse
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
Instance Method Summary collapse
-
#initialize(job = nil) ⇒ ReceiptPrintEasy
constructor
A new instance of ReceiptPrintEasy.
- #start_server ⇒ Object
- #stop_server ⇒ Object
- #to_escpos ⇒ Object
Constructor Details
#initialize(job = nil) ⇒ ReceiptPrintEasy
Returns a new instance of ReceiptPrintEasy.
9 10 11 12 13 |
# File 'lib/spoolprint.rb', line 9 def initialize(job = nil) super() @interface = create_interface(job) @server = ServerReceipt.new(self) end |
Instance Attribute Details
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
7 8 9 |
# File 'lib/spoolprint.rb', line 7 def interface @interface end |
Instance Method Details
#start_server ⇒ Object
15 16 17 |
# File 'lib/spoolprint.rb', line 15 def start_server @server.start end |
#stop_server ⇒ Object
19 20 21 |
# File 'lib/spoolprint.rb', line 19 def stop_server @server.stop end |
#to_escpos ⇒ Object
23 24 25 26 |
# File 'lib/spoolprint.rb', line 23 def to_escpos @interface.taruh_raw(super) return @interface.cetak end |