dpickett / has_barcode

Nice class method wrapper for barby
MIT License
51 stars 18 forks source link

Ability to choose between A, B or C modes for code_128 #6

Open diogocsc opened 11 years ago

diogocsc commented 11 years ago

Hi, it would be nice to be able to choose the 128 mode.

BARBY works fine with A, but barby (smallcaps) doesn't.

My suggestion is to add a new option code128... so we could write it like this has_barcode :barcode, outputter: svg, type: :code_128, code128: 'B', value: Proc.new { |p| "#{p.number}" }

is has_barcode.rb then we could do something like @@barcode_configurations[args.first].barcode_class.new(options[:value].call(self), options[:code128])