Class: PrintClient::DefaultPrinter
- Inherits:
-
Object
- Object
- PrintClient::DefaultPrinter
- Defined in:
- lib/print_client.rb
Instance Method Summary collapse
- #default ⇒ Object
-
#initialize ⇒ DefaultPrinter
constructor
A new instance of DefaultPrinter.
Constructor Details
#initialize ⇒ DefaultPrinter
Returns a new instance of DefaultPrinter.
13 14 15 16 |
# File 'lib/print_client.rb', line 13 def initialize config = YAML::load_file("./virtusprinter.yml") @vp_port = config['virtusprinter']['port'] end |
Instance Method Details
#default ⇒ Object
17 18 19 20 21 |
# File 'lib/print_client.rb', line 17 def default port = SerialPort.new(@vp_port, 9600, 8, 1) port.write "^default\n" port.close end |