Sha256: 34cdf964690fd8f279badcfca135597cd7c82af3070500dd47400812288d6f46
Contents?: true
Size: 916 Bytes
Versions: 4
Compression:
Stored size: 916 Bytes
Contents
module Zebra module Zpl module BarcodeType class InvalidBarcodeTypeError < StandardError; end CODE_39 = "3" CODE_93 = "A" CODE_128_AUTO = "C" CODABAR = "K" CODE_AZTEC = "0" CODE_AZTEC_PARAMS = "O" CODE_UPS_MAXICODE = "D" CODE_QR = "Q" # Legacy (EPL) bar code suffixes # CODE_39 = "3" # CODE_39_CHECK_DIGIT = "3C" # CODE_93 = "9" # CODE_128_AUTO = "1" # CODE_128_A = "1A" # CODE_128_B = "1B" # CODE_128_C = "1C" # CODABAR = "K" def self.valid_barcode_type?(type) %w(3 A C K 0 O D Q).include? type end def self.validate_barcode_type(type) raise InvalidBarcodeTypeError unless valid_barcode_type?(type) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
zebra-zpl-1.0.5 | lib/zebra/zpl/barcode_type.rb |
zebra-zpl-1.0.2 | lib/zebra/zpl/barcode_type.rb |
zebra-zpl-1.0.1 | lib/zebra/zpl/barcode_type.rb |
zebra-zpl-1.0.0 | lib/zebra/zpl/barcode_type.rb |