File: code_25_iata.rb

package info (click to toggle)
ruby-barby 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 356 kB
  • sloc: ruby: 2,061; java: 1,228; makefile: 7
file content (23 lines) | stat: -rw-r--r-- 503 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'barby/barcode/code_25'

module Barby

  #The IATA version of 2 of 5 is identical to its parent except for different
  #start and stop codes. This is the one used on the tags they put on your
  #luggage when you check it in at the airport.
  class Code25IATA < Code25

    START_ENCODING = [N,N]
    STOP_ENCODING  = [W,N]

    def start_encoding
      encoding_for_bars(START_ENCODING)
    end

    def stop_encoding
      encoding_for_bars_without_end_space(STOP_ENCODING)
    end

  end

end