Sha256: 8d6381660457aa4f5a1a8d0a0024f4030c19b7a29fc7af3e77f8c27175b025ac

Contents?: true

Size: 664 Bytes

Versions: 17

Compression:

Stored size: 664 Bytes

Contents

require 'barby/barcode/code_128'

module Barby


  #AKA EAN-128, UCC-128
  class GS1128 < Code128

    attr_accessor :application_identifier

    def initialize(data, type, ai)
      self.application_identifier = ai
      super(data, type)
    end


    #TODO: Not sure this is entirely right
    def data
      FNC1+application_identifier+super
    end

    def partial_data
      @data
    end

    def application_identifier_number
      values[application_identifier]
    end

    def application_identifier_encoding
      encodings[application_identifier_number]
    end

    def to_s
      "(#{application_identifier}) #{partial_data}"
    end


  end


end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
barby-0.6.2 lib/barby/barcode/gs1_128.rb
barby-0.6.1 lib/barby/barcode/gs1_128.rb
barby-0.6.0 lib/barby/barcode/gs1_128.rb
barby-0.5.1 lib/barby/barcode/gs1_128.rb
arena_barby-0.3.2 lib/barby/barcode/gs1_128.rb
barby-chunky_png-0.3.4 lib/barby/barcode/gs1_128.rb
barby-0.5.0 lib/barby/barcode/gs1_128.rb
barby-0.4.5 lib/barby/barcode/gs1_128.rb
barby-0.4.4 lib/barby/barcode/gs1_128.rb
barby-0.4.3 lib/barby/barcode/gs1_128.rb
barby-0.4.2 lib/barby/barcode/gs1_128.rb
barby-0.4.1 lib/barby/barcode/gs1_128.rb
barby-0.4.0 lib/barby/barcode/gs1_128.rb
barby-chunky_png-0.3.3 lib/barby/barcode/gs1_128.rb
barby-0.3.2 lib/barby/barcode/gs1_128.rb
barby-0.3.1 lib/barby/barcode/gs1_128.rb
barby-0.3.0 lib/barby/barcode/gs1_128.rb