struct

Goban::Segment

Inherits Struct / Value / Object

Represents a segment of QR Code data that holds its data bits and encoding type.

Constants

ALPHANUMERIC_CHARS = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', '$', '%', '*', '+', '-', '.', '/', ':'}

Constructors

new(mode : Mode, text : String)
Source

Class methods

alphanumeric(text : String)

Shorthand method for creating a Alphanumeric mode segment.

Source
byte(text : String)

Shorthand method for creating a Byte mode segment.

Source
count_total_bits(segments : Array(Segment), version : AbstractQR::Version)

Count number of bits in the given list of segments.

Source
kanji(text : String)

Shorthand method for creating a Kanji mode segment.

Source
numeric(text : String)

Shorthand method for creating a Numeric mode segment.

Source

Instance methods

bit_size
Source
char_count
Source
mode
Source
text
Source

Nested types