Class RQRCode::QR8bitByte
In: lib/rqrcode/qrcode/qr_8bit_byte.rb
Parent: Object
RuntimeError QRCodeRunTimeError ArgumentError QRCodeArgumentError QRBitBuffer QR8bitByte QRMath QRRSBlock QRUtil QRPolynomial QRCode lib/rqrcode/qrcode/qr_bit_buffer.rb lib/rqrcode/qrcode/qr_8bit_byte.rb lib/rqrcode/qrcode/qr_math.rb lib/rqrcode/qrcode/qr_rs_block.rb lib/rqrcode/qrcode/qr_util.rb lib/rqrcode/qrcode/qr_polynomial.rb lib/rqrcode/qrcode/qr_code.rb RQRCode dot/m_11_0.png

Methods

get_length   new   write  

Attributes

mode  [R] 

Public Class methods

[Source]

    # File lib/rqrcode/qrcode/qr_8bit_byte.rb, line 17
17:     def initialize( data )
18:       @mode = QRMODE[:mode_8bit_byte]
19:       @data = data;
20:     end

Public Instance methods

[Source]

    # File lib/rqrcode/qrcode/qr_8bit_byte.rb, line 23
23:     def get_length
24:       @data.size
25:     end

[Source]

    # File lib/rqrcode/qrcode/qr_8bit_byte.rb, line 28
28:     def write( buffer )
29:       ( 0...@data.size ).each do |i|
30:         c = @data[i]
31:         c = c.ord if c.respond_to?(:ord)#String#[] returns single-char string in 1.9, .ord gets ASCII pos
32:         buffer.put( c, 8 )
33:       end
34:     end

[Validate]