class RQRCodeCore::QRSegment

def writer

def writer
  case mode
  when :mode_number
    QRNumeric.new(data)
  when :mode_alpha_numk
    QRAlphanumeric.new(data)
  when :mode_multi
    QRMulti.new(data)
  else
    QR8bitByte.new(data)
  end
end