Sha256: 991af0a95819d14bd766d98dacb73fba2841dcba106f79fb2995840913314a4d

Contents?: true

Size: 196 Bytes

Versions: 4

Compression:

Stored size: 196 Bytes

Contents

module Imb

  module NumericConversions

    def numeric_to_bytes(n, min_bytes=0)
      n.to_s(16).rjust(2 * min_bytes, '0').scan(/../).map do |s|
        s.to_i(16)
      end
    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
USPS-intelligent-barcode-0.2.0 lib/USPS-intelligent-barcode/NumericConversions.rb
USPS-intelligent-barcode-0.1.2 lib/USPS-intelligent-barcode/NumericConversions.rb
USPS-intelligent-barcode-0.1.1 lib/USPS-intelligent-barcode/NumericConversions.rb
USPS-intelligent-barcode-0.1.0 lib/USPS-intelligent-barcode/NumericConversions.rb