Sha256: 95afc2e432526d617b4185b8e25456cfadd765c26261fd7ff4a1755bda40968a

Contents?: true

Size: 504 Bytes

Versions: 2

Compression:

Stored size: 504 Bytes

Contents

module Imb

  # Represents the position of one bit in the array of intelligent
  # barcode "characters".  This class is internal and may change.

  class CharacterPosition

    # Create.

    def initialize(character_index, bit_number)
      @character_index = character_index
      @bit_number = bit_number
    end

    # Given an array of characters, return the bit for this position.

    def extract_bit_from_characters(characters)
      characters[@character_index][@bit_number]
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
USPS-intelligent-barcode-0.2.2 lib/USPS-intelligent-barcode/CharacterPosition.rb
USPS-intelligent-barcode-0.2.1 lib/USPS-intelligent-barcode/CharacterPosition.rb