Sha256: 48b638ba1a0cd8c004ba6b17a23dc6dae5de9bcffbc8fde5e57fbdb86a310e46
Contents?: true
Size: 618 Bytes
Versions: 8
Compression:
Stored size: 618 Bytes
Contents
module Imb # @!group Internal # Represents the position of one bit in the array of intelligent # barcode "characters". class CharacterPosition # @param [Integer] character_index # @param [Integer] bit_number 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. # @param [[Integer]] characters # @return [Integer] bit (0 or 1) def extract_bit_from_characters(characters) characters[@character_index][@bit_number] end end end
Version data entries
8 entries across 7 versions & 2 rubygems