Class: PrintClient::ConfigPrinter

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

Instance Method Summary collapse

Constructor Details

#initializeConfigPrinter

Returns a new instance of ConfigPrinter.



25
26
27
28
# File 'lib/print_client.rb', line 25

def initialize
  config = YAML::load_file("./virtusprinter.yml")
  @vp_port = config['virtusprinter']['port']
end

Instance Method Details

#configObject



29
30
31
32
33
# File 'lib/print_client.rb', line 29

def config
  port = SerialPort.new(@vp_port, 9600, 8, 1)
  port.write "xa\nI8,A,003\n"
  port.close
end