class Printer::InstallGenerator

Public Instance Methods

create_cmd_in_bin() click to toggle source
# File lib/generators/printer/install_generator.rb, line 4
  def create_cmd_in_bin
    path = `bundle list oxen_printer`.strip
    create_file "bin/printer_cmd.sh", <<PRINTERCMD
#!/bin/sh
# This command was installed by rake generate oxen_printer:install
# and provides the generic printer_cmd to the oxen_printer Gem
java -jar #{path}/lib/java_pdf/barcodeprinter.jar $1 $2
PRINTERCMD
    system 'chmod +x bin/printer_cmd.sh'
  end