Class: PrintClient::ConfigPrinter
- Inherits:
-
Object
- Object
- PrintClient::ConfigPrinter
- Defined in:
- lib/print_client.rb
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize ⇒ ConfigPrinter
constructor
A new instance of ConfigPrinter.
Constructor Details
#initialize ⇒ ConfigPrinter
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
#config ⇒ Object
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 |