class Languages::Epl2::BarcodeFactory
Public Class Methods
create_barcode(code_type, opts = {})
click to toggle source
# File lib/languages/epl2/barcode.rb, line 4 def self.create_barcode(code_type, opts = {}) if Barcode1D::BarcodeClasses.keys.include? code_type Barcode1D.new code_type, opts elsif Barcode2D::BarcodeClasses.keys.include? code_type Barcode2D.new code_type, opts else raise ArgumentException.new("Unknown barcode: #{code_type}") end end