ruby-zint 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +9 -0
  3. data/README.md +13 -5
  4. data/ext/ruby-zint/extconf.rb +2 -2
  5. data/lib/zint/aus_post.rb +3 -2
  6. data/lib/zint/aus_redirect.rb +3 -2
  7. data/lib/zint/aus_reply.rb +3 -2
  8. data/lib/zint/aus_route.rb +3 -2
  9. data/lib/zint/azrune.rb +3 -2
  10. data/lib/zint/aztec.rb +3 -2
  11. data/lib/zint/barcode.rb +109 -105
  12. data/lib/zint/bc_412.rb +8 -0
  13. data/lib/zint/c25iata.rb +3 -2
  14. data/lib/zint/c25ind.rb +3 -2
  15. data/lib/zint/c25inter.rb +3 -2
  16. data/lib/zint/c25logic.rb +3 -2
  17. data/lib/zint/c25matrix.rb +3 -2
  18. data/lib/zint/c25standard.rb +3 -2
  19. data/lib/zint/cep_net.rb +8 -0
  20. data/lib/zint/channel.rb +3 -2
  21. data/lib/zint/codabar.rb +3 -2
  22. data/lib/zint/codablock_f.rb +3 -2
  23. data/lib/zint/code11.rb +3 -2
  24. data/lib/zint/code128.rb +3 -2
  25. data/lib/zint/code128ab.rb +8 -0
  26. data/lib/zint/code128b.rb +2 -4
  27. data/lib/zint/code16k.rb +3 -2
  28. data/lib/zint/code32.rb +3 -2
  29. data/lib/zint/code39.rb +3 -2
  30. data/lib/zint/code49.rb +3 -2
  31. data/lib/zint/code93.rb +3 -2
  32. data/lib/zint/code_one.rb +3 -2
  33. data/lib/zint/constants/capability_flags.rb +14 -11
  34. data/lib/zint/constants/input_data_types.rb +8 -7
  35. data/lib/zint/constants/output_options.rb +14 -11
  36. data/lib/zint/constants/symbologies.rb +13 -6
  37. data/lib/zint/constants/warn_levels.rb +1 -1
  38. data/lib/zint/daft.rb +3 -2
  39. data/lib/zint/data_matrix.rb +4 -3
  40. data/lib/zint/dbarexp.rb +3 -2
  41. data/lib/zint/dbarexpstk.rb +3 -2
  42. data/lib/zint/dbarltd.rb +3 -2
  43. data/lib/zint/dbaromn.rb +3 -2
  44. data/lib/zint/dbaromnstk.rb +3 -2
  45. data/lib/zint/dbarstk.rb +3 -2
  46. data/lib/zint/dependencies.rb +2 -3
  47. data/lib/zint/dot_code.rb +3 -2
  48. data/lib/zint/dpd.rb +3 -2
  49. data/lib/zint/dpident.rb +3 -2
  50. data/lib/zint/dpleit.rb +3 -2
  51. data/lib/zint/ean128.rb +3 -2
  52. data/lib/zint/ean14.rb +3 -2
  53. data/lib/zint/eanx.rb +3 -2
  54. data/lib/zint/eanxchk.rb +3 -2
  55. data/lib/zint/excode39.rb +3 -2
  56. data/lib/zint/fim.rb +3 -2
  57. data/lib/zint/flat.rb +3 -2
  58. data/lib/zint/grid_matrix.rb +3 -2
  59. data/lib/zint/gs1_128.rb +3 -2
  60. data/lib/zint/hanxin.rb +3 -2
  61. data/lib/zint/hibc128.rb +3 -2
  62. data/lib/zint/hibc39.rb +3 -2
  63. data/lib/zint/hibcaztec.rb +3 -2
  64. data/lib/zint/hibcblockf.rb +3 -2
  65. data/lib/zint/hibcdm.rb +3 -2
  66. data/lib/zint/hibcmicpdf.rb +3 -2
  67. data/lib/zint/hibcpdf.rb +3 -2
  68. data/lib/zint/hibcqr.rb +3 -2
  69. data/lib/zint/isbnx.rb +3 -2
  70. data/lib/zint/itf14.rb +3 -2
  71. data/lib/zint/japan_post.rb +3 -2
  72. data/lib/zint/kix.rb +3 -2
  73. data/lib/zint/korea_post.rb +3 -2
  74. data/lib/zint/logmars.rb +3 -2
  75. data/lib/zint/mailmark.rb +3 -2
  76. data/lib/zint/mailmark_2d.rb +8 -0
  77. data/lib/zint/mailmark_4s.rb +8 -0
  78. data/lib/zint/maxi_code.rb +3 -2
  79. data/lib/zint/micro_pdf417.rb +3 -2
  80. data/lib/zint/micro_qr.rb +3 -2
  81. data/lib/zint/msiplessey.rb +3 -2
  82. data/lib/zint/native.rb +1 -1
  83. data/lib/zint/nve18.rb +3 -2
  84. data/lib/zint/one_code.rb +3 -2
  85. data/lib/zint/pdf417.rb +3 -2
  86. data/lib/zint/pdf417comp.rb +3 -2
  87. data/lib/zint/pdf417trunc.rb +3 -2
  88. data/lib/zint/pharma.rb +3 -2
  89. data/lib/zint/pharmatwo.rb +3 -2
  90. data/lib/zint/planet.rb +3 -2
  91. data/lib/zint/plessey.rb +3 -2
  92. data/lib/zint/postnet.rb +3 -2
  93. data/lib/zint/pzn.rb +3 -2
  94. data/lib/zint/qr.rb +3 -2
  95. data/lib/zint/rmqr.rb +3 -2
  96. data/lib/zint/rss14.rb +3 -2
  97. data/lib/zint/rss14stack.rb +3 -2
  98. data/lib/zint/rss14stackomni.rb +3 -2
  99. data/lib/zint/rssexp.rb +3 -2
  100. data/lib/zint/rssexpstack.rb +3 -2
  101. data/lib/zint/rssltd.rb +3 -2
  102. data/lib/zint/structs/structapp.rb +25 -0
  103. data/lib/zint/structs/symbol.rb +38 -35
  104. data/lib/zint/structs/vector_circle.rb +3 -2
  105. data/lib/zint/telepen.rb +3 -2
  106. data/lib/zint/telepennum.rb +3 -2
  107. data/lib/zint/ultra.rb +3 -2
  108. data/lib/zint/upc_a.rb +3 -2
  109. data/lib/zint/upc_a_chk.rb +3 -2
  110. data/lib/zint/upc_e.rb +3 -2
  111. data/lib/zint/upc_e_chk.rb +3 -2
  112. data/lib/zint/upnqr.rb +3 -2
  113. data/lib/zint/upu_s10.rb +8 -0
  114. data/lib/zint/uspsimail.rb +3 -2
  115. data/lib/zint/version.rb +1 -1
  116. data/lib/zint/vin.rb +3 -2
  117. data/lib/zint.rb +8 -1
  118. data/ports/archives/zint-2.12.0-src.tar.gz +0 -0
  119. metadata +128 -10
  120. data/lib/zint/bind.rb +0 -7
  121. data/lib/zint/box.rb +0 -7
  122. data/lib/zint/dotty_mode.rb +0 -7
  123. data/lib/zint/noascii.rb +0 -7
  124. data/lib/zint/stdout.rb +0 -7
  125. data/ports/archives/zint-2.10.0-src.tar.gz +0 -0
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Grid Matrix
2
3
  class GridMatrix < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_GRIDMATRIX, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_GRIDMATRIX, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/gs1_128.rb CHANGED
@@ -1,9 +1,10 @@
1
1
  module Zint
2
2
  # standard:disable Naming/ClassAndModuleCamelCase
3
+ # GS1-128
3
4
  class Gs1_128 < Barcode
4
5
  # standard:enable Naming/ClassAndModuleCamelCase
5
- def initialize(value: nil, input_file: nil, options: {})
6
- super(value: value, input_file: input_file, type: Zint::BARCODE_GS1_128, options: options)
6
+ def initialize(value: nil, input_file: nil, **kwargs)
7
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_GS1_128, **kwargs)
7
8
  end
8
9
  end
9
10
  end
data/lib/zint/hanxin.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Han Xin (Chinese Sensible) Code
2
3
  class Hanxin < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HANXIN, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HANXIN, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/hibc128.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC (Health Industry Barcode) Code 128
2
3
  class Hibc128 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_128, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_128, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/hibc39.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC Code 39
2
3
  class Hibc39 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_39, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_39, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC Aztec Code
2
3
  class HibcAztec < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_AZTEC, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_AZTEC, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC Codablock-F
2
3
  class HibcBlockf < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_BLOCKF, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_BLOCKF, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/hibcdm.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC Data Matrix
2
3
  class HibcDm < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_DM, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_DM, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC MicroPDF417
2
3
  class HibcMicpdf < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_MICPDF, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_MICPDF, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/hibcpdf.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC PDF417
2
3
  class HibcPdf < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_PDF, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_PDF, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/hibcqr.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # HIBC QR Code
2
3
  class HibcQr < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_HIBC_QR, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_HIBC_QR, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/isbnx.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # ISBN
2
3
  class Isbnx < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_ISBNX, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_ISBNX, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/itf14.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # ITF-14
2
3
  class Itf14 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_ITF14, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_ITF14, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Japanese Postal Code
2
3
  class JapanPost < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_JAPANPOST, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_JAPANPOST, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/kix.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Dutch Post KIX Code
2
3
  class Kix < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_KIX, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_KIX, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Korea Post
2
3
  class KoreaPost < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_KOREAPOST, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_KOREAPOST, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/logmars.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # LOGMARS
2
3
  class Logmars < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_LOGMARS, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_LOGMARS, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/mailmark.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Mailmark < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_MAILMARK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MAILMARK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Royal Mail 2D Mailmark (CMDM) (Data Matrix)
3
+ class Mailmark2D < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MAILMARK_2D, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Zint
2
+ # Royal Mail 4-State Mailmark
3
+ class Mailmark4S < Barcode
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MAILMARK_4S, **kwargs)
6
+ end
7
+ end
8
+ end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # MaxiCode
2
3
  class MaxiCode < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_MAXICODE, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MAXICODE, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # MicroPDF417
2
3
  class MicroPdf417 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_MICROPDF417, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MICROPDF417, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/micro_qr.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Micro QR Code
2
3
  class MicroQr < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_MICROQR, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MICROQR, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # MSI Plessey
2
3
  class MsiPlessey < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_MSI_PLESSEY, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_MSI_PLESSEY, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/native.rb CHANGED
@@ -5,7 +5,7 @@ module Zint
5
5
  root_path = File.expand_path("../../..", __FILE__)
6
6
  prefix = FFI::Platform::LIBPREFIX.empty? ? "lib" : FFI::Platform::LIBPREFIX
7
7
  bundled_dll = File.join(root_path, "lib/#{prefix}zint.#{FFI::Platform::LIBSUFFIX}")
8
- ffi_lib [bundled_dll, "libzint.so.2.10", "libzint", "zint"]
8
+ ffi_lib [bundled_dll, "libzint.so.2.12", "libzint", "zint"]
9
9
 
10
10
  # Error codes (API return values)
11
11
  enum :error_code, [Constants::Warnings::WARNINGS, Constants::Errors::ERRORS].map { |h| h.to_a }.flatten
data/lib/zint/nve18.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # NVE-18 (SSCC-18)
2
3
  class Nve18 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_NVE18, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_NVE18, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/one_code.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class OneCode < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_ONECODE, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_ONECODE, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/pdf417.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # PDF417
2
3
  class Pdf417 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PDF417, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PDF417, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Compact PDF417 (Truncated PDF417)
2
3
  class Pdf417comp < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PDF417COMP, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PDF417COMP, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Pdf417trunc < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PDF417TRUNC, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PDF417TRUNC, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/pharma.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Pharmacode One-Track
2
3
  class Pharma < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PHARMA, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PHARMA, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Pharmacode Two-Track
2
3
  class PharmaTwo < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PHARMA_TWO, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PHARMA_TWO, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/planet.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # USPS PLANET
2
3
  class Planet < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PLANET, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PLANET, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/plessey.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # UK Plessey
2
3
  class Plessey < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PLESSEY, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PLESSEY, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/postnet.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # USPS (U.S. Postal Service) POSTNET
2
3
  class Postnet < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_POSTNET, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_POSTNET, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/pzn.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Pharmazentralnummer
2
3
  class Pzn < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_PZN, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_PZN, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/qr.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  module Zint
2
+ # QR Code
2
3
  class Qr < Barcode
3
4
  # ECC Levels
4
5
  ECC_LEVEL_L = 1
@@ -9,8 +10,8 @@ module Zint
9
10
  # Current ECC level of QR code
10
11
  attr_reader :ecc_level
11
12
 
12
- def initialize(value: nil, input_file: nil, ecc_level: ECC_LEVEL_L, options: {})
13
- super(value: value, input_file: input_file, type: Zint::BARCODE_QRCODE, options: options.merge(option_1: ecc_level))
13
+ def initialize(value: nil, input_file: nil, ecc_level: ECC_LEVEL_L, **kwargs)
14
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_QRCODE, **kwargs.merge(option_1: ecc_level))
14
15
  @ecc_level = ecc_level
15
16
  end
16
17
  end
data/lib/zint/rmqr.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Rectangular Micro QR Code (rMQR)
2
3
  class Rmqr < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RMQR, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RMQR, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/rss14.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Rss14 < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RSS14, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RSS14, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Rss14stack < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RSS14STACK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RSS14STACK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class Rss14stackOmni < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RSS14STACK_OMNI, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RSS14STACK_OMNI, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/rssexp.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class RssExp < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RSS_EXP, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RSS_EXP, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class RssExpstack < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RSS_EXPSTACK, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RSS_EXPSTACK, **kwargs)
5
6
  end
6
7
  end
7
8
  end
data/lib/zint/rssltd.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  module Zint
2
+ # Legacy
2
3
  class RssLtd < Barcode
3
- def initialize(value: nil, input_file: nil, options: {})
4
- super(value: value, input_file: input_file, type: Zint::BARCODE_RSS_LTD, options: options)
4
+ def initialize(value: nil, input_file: nil, **kwargs)
5
+ super(value: value, input_file: input_file, symbology: Zint::BARCODE_RSS_LTD, **kwargs)
5
6
  end
6
7
  end
7
8
  end
@@ -0,0 +1,25 @@
1
+ module Zint
2
+ module Structs
3
+ # Structured Append info - ignored unless `zint_structapp.count` is set to non-zero value
4
+ class Structapp < FFI::Struct
5
+ layout :index, :int, # Position in Structured Append sequence, 1-based. Must be <= `count`
6
+ :count, :int, # Number of symbols in Structured Append sequence. Set >= 2 to add SA Info
7
+ :id, [:char, 32] # Optional ID to distinguish sequence, ASCII, NUL-terminated unless max 32 long
8
+
9
+ # Position in Structured Append sequence, 1-based. Must be <= `count`
10
+ def index
11
+ self[:index]
12
+ end
13
+
14
+ # Number of symbols in Structured Append sequence. Set >= 2 to add SA Info
15
+ def count
16
+ self[:count]
17
+ end
18
+
19
+ # Optional ID to distinguish sequence, ASCII, NUL-terminated unless max 32 long
20
+ def id
21
+ self[:id]
22
+ end
23
+ end
24
+ end
25
+ end