Class: PrintClient::DefaultPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/print_client.rb

Instance Method Summary collapse

Constructor Details

#initializeDefaultPrinter

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

#defaultObject



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