paperback 0.0.3 → 0.0.5
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.
- checksums.yaml +5 -5
- data/.github/workflows/tests.yml +46 -0
- data/.rubocop-disables.yml +26 -12
- data/CHANGELOG.md +21 -0
- data/README.md +27 -6
- data/bin/paperback +4 -0
- data/lib/paperback/cli.rb +38 -2
- data/lib/paperback/document.rb +134 -17
- data/lib/paperback/preparer.rb +107 -29
- data/lib/paperback/version.rb +2 -1
- data/lib/paperback.rb +12 -0
- data/paperback.gemspec +10 -7
- data/sorbet/config +3 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/chunky_png@1.4.0.rbi +4498 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/parser@3.2.0.0.rbi +6963 -0
- data/sorbet/rbi/gems/pdf-core@0.4.0.rbi +1682 -0
- data/sorbet/rbi/gems/prawn@1.3.0.rbi +5567 -0
- data/sorbet/rbi/gems/pry@0.14.1.rbi +9990 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +408 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3023 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3481 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
- data/sorbet/rbi/gems/rqrcode@0.10.1.rbi +617 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10791 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +8106 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +5305 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
- data/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi +6617 -0
- data/sorbet/rbi/gems/rubocop@0.93.1.rbi +40848 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1234 -0
- data/sorbet/rbi/gems/sixword@0.4.0.rbi +536 -0
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
- data/sorbet/rbi/gems/subprocess@1.5.6.rbi +391 -0
- data/sorbet/rbi/gems/tapioca@0.10.5.rbi +3207 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/ttfunk@1.4.0.rbi +1951 -0
- data/sorbet/rbi/gems/unicode-display_width@1.8.0.rbi +40 -0
- data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17816 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/spec/functional/paperback/cli_spec.rb +195 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/unit/paperback_spec.rb +1 -0
- metadata +91 -7
@@ -0,0 +1,617 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `rqrcode` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem rqrcode`.
|
6
|
+
|
7
|
+
# source://rqrcode//lib/rqrcode/core_ext/array.rb#3
|
8
|
+
class Array
|
9
|
+
include ::Enumerable
|
10
|
+
include ::RQRCode::CoreExtensions::Array::Behavior
|
11
|
+
end
|
12
|
+
|
13
|
+
# source://rqrcode//lib/rqrcode/core_ext/integer.rb#3
|
14
|
+
class Integer < ::Numeric
|
15
|
+
include ::RQRCode::CoreExtensions::Integer::Bitwise
|
16
|
+
end
|
17
|
+
|
18
|
+
# source://rqrcode//lib/rqrcode/core_ext/array/behavior.rb#1
|
19
|
+
module RQRCode; end
|
20
|
+
|
21
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#3
|
22
|
+
RQRCode::ALPHANUMERIC = T.let(T.unsafe(nil), Array)
|
23
|
+
|
24
|
+
# source://rqrcode//lib/rqrcode/core_ext/array/behavior.rb#2
|
25
|
+
module RQRCode::CoreExtensions; end
|
26
|
+
|
27
|
+
# source://rqrcode//lib/rqrcode/core_ext/array/behavior.rb#3
|
28
|
+
module RQRCode::CoreExtensions::Array; end
|
29
|
+
|
30
|
+
# source://rqrcode//lib/rqrcode/core_ext/array/behavior.rb#4
|
31
|
+
module RQRCode::CoreExtensions::Array::Behavior
|
32
|
+
# source://rqrcode//lib/rqrcode/core_ext/array/behavior.rb#5
|
33
|
+
def extract_options!; end
|
34
|
+
end
|
35
|
+
|
36
|
+
# source://rqrcode//lib/rqrcode/core_ext/integer/bitwise.rb#3
|
37
|
+
module RQRCode::CoreExtensions::Integer; end
|
38
|
+
|
39
|
+
# source://rqrcode//lib/rqrcode/core_ext/integer/bitwise.rb#4
|
40
|
+
module RQRCode::CoreExtensions::Integer::Bitwise
|
41
|
+
# source://rqrcode//lib/rqrcode/core_ext/integer/bitwise.rb#5
|
42
|
+
def rszf(count); end
|
43
|
+
end
|
44
|
+
|
45
|
+
# source://rqrcode//lib/rqrcode/export/png.rb#6
|
46
|
+
module RQRCode::Export; end
|
47
|
+
|
48
|
+
# source://rqrcode//lib/rqrcode/export/ansi.rb#3
|
49
|
+
module RQRCode::Export::ANSI
|
50
|
+
# Returns a string of the QR code as
|
51
|
+
# characters writen with ANSI background set.
|
52
|
+
#
|
53
|
+
# Options:
|
54
|
+
# light: Foreground ("\033[47m")
|
55
|
+
# dark: Background ANSI code. ("\033[47m")
|
56
|
+
# fill_character: The written character. (' ')
|
57
|
+
# quiet_zone_size: (4)
|
58
|
+
#
|
59
|
+
# source://rqrcode//lib/rqrcode/export/ansi.rb#14
|
60
|
+
def as_ansi(options = T.unsafe(nil)); end
|
61
|
+
end
|
62
|
+
|
63
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#4
|
64
|
+
module RQRCode::Export::HTML
|
65
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#6
|
66
|
+
def as_html; end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#12
|
71
|
+
def rows; end
|
72
|
+
end
|
73
|
+
|
74
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#36
|
75
|
+
class RQRCode::Export::HTML::Cell < ::Struct
|
76
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#37
|
77
|
+
def as_html; end
|
78
|
+
|
79
|
+
# @return [Boolean]
|
80
|
+
#
|
81
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#45
|
82
|
+
def dark?; end
|
83
|
+
|
84
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#41
|
85
|
+
def html_class; end
|
86
|
+
end
|
87
|
+
|
88
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#26
|
89
|
+
class RQRCode::Export::HTML::Row < ::Struct
|
90
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#27
|
91
|
+
def as_html; end
|
92
|
+
|
93
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#31
|
94
|
+
def cells; end
|
95
|
+
end
|
96
|
+
|
97
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#16
|
98
|
+
class RQRCode::Export::HTML::Rows < ::Struct
|
99
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#17
|
100
|
+
def as_html; end
|
101
|
+
|
102
|
+
# source://rqrcode//lib/rqrcode/export/html.rb#21
|
103
|
+
def rows; end
|
104
|
+
end
|
105
|
+
|
106
|
+
# source://rqrcode//lib/rqrcode/export/png.rb#7
|
107
|
+
module RQRCode::Export::PNG
|
108
|
+
# Render the PNG from the Qrcode.
|
109
|
+
#
|
110
|
+
# There are two sizing algoritams.
|
111
|
+
#
|
112
|
+
# - Original that can result in blurry and hard to scan images
|
113
|
+
# - Google's Chart API inspired sizing that resizes the module size to fit within the given image size.
|
114
|
+
#
|
115
|
+
# The Googleis one will be used when no options are given or when the new size option is used.
|
116
|
+
#
|
117
|
+
# Options:
|
118
|
+
# fill - Background ChunkyPNG::Color, defaults to 'white'
|
119
|
+
# color - Foreground ChunkyPNG::Color, defaults to 'black'
|
120
|
+
#
|
121
|
+
# *Googleis*
|
122
|
+
# size - Total size of PNG in pixels. The module size is calculated so it fits. (defaults to 90)
|
123
|
+
# border_modules - Width of white border around in modules. (defaults to 4).
|
124
|
+
#
|
125
|
+
# -- DONT USE border_modules OPTION UNLESS YOU KNOW ABOUT THE QUIET ZONE NEEDS OF QR CODES --
|
126
|
+
#
|
127
|
+
# *Original*
|
128
|
+
# module_px_size - Image size, in pixels.
|
129
|
+
# border - Border thickness, in pixels
|
130
|
+
#
|
131
|
+
# It first creates an image where 1px = 1 module, then resizes.
|
132
|
+
# Defaults to 90x90 pixels, customizable by option.
|
133
|
+
#
|
134
|
+
# source://rqrcode//lib/rqrcode/export/png.rb#35
|
135
|
+
def as_png(options = T.unsafe(nil)); end
|
136
|
+
end
|
137
|
+
|
138
|
+
# source://rqrcode//lib/rqrcode/export/svg.rb#6
|
139
|
+
module RQRCode::Export::SVG
|
140
|
+
# Render the SVG from the Qrcode.
|
141
|
+
#
|
142
|
+
# Options:
|
143
|
+
# offset - Padding around the QR Code (e.g. 10)
|
144
|
+
# fill - Background color (e.g "ffffff" or :white)
|
145
|
+
# color - Foreground color for the code (e.g. "000000" or :black)
|
146
|
+
# module_size - The Pixel size of each module (e.g. 11)
|
147
|
+
# shape_rendering - Defaults to crispEdges
|
148
|
+
#
|
149
|
+
# source://rqrcode//lib/rqrcode/export/svg.rb#17
|
150
|
+
def as_svg(options = T.unsafe(nil)); end
|
151
|
+
end
|
152
|
+
|
153
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#3
|
154
|
+
RQRCode::NUMERIC = T.let(T.unsafe(nil), Array)
|
155
|
+
|
156
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_8bit_byte.rb#14
|
157
|
+
class RQRCode::QR8bitByte
|
158
|
+
# @return [QR8bitByte] a new instance of QR8bitByte
|
159
|
+
#
|
160
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_8bit_byte.rb#17
|
161
|
+
def initialize(data); end
|
162
|
+
|
163
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_8bit_byte.rb#23
|
164
|
+
def get_length; end
|
165
|
+
|
166
|
+
# Returns the value of attribute mode.
|
167
|
+
#
|
168
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_8bit_byte.rb#15
|
169
|
+
def mode; end
|
170
|
+
|
171
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_8bit_byte.rb#28
|
172
|
+
def write(buffer); end
|
173
|
+
end
|
174
|
+
|
175
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#5
|
176
|
+
class RQRCode::QRAlphanumeric
|
177
|
+
# @raise [QRCodeArgumentError]
|
178
|
+
# @return [QRAlphanumeric] a new instance of QRAlphanumeric
|
179
|
+
#
|
180
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#8
|
181
|
+
def initialize(data); end
|
182
|
+
|
183
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#17
|
184
|
+
def get_length; end
|
185
|
+
|
186
|
+
# Returns the value of attribute mode.
|
187
|
+
#
|
188
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#6
|
189
|
+
def mode; end
|
190
|
+
|
191
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#29
|
192
|
+
def write(buffer); end
|
193
|
+
|
194
|
+
class << self
|
195
|
+
# @return [Boolean]
|
196
|
+
#
|
197
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_alphanumeric.rb#21
|
198
|
+
def valid_data?(data); end
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#14
|
203
|
+
class RQRCode::QRBitBuffer
|
204
|
+
# @return [QRBitBuffer] a new instance of QRBitBuffer
|
205
|
+
#
|
206
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#20
|
207
|
+
def initialize(version); end
|
208
|
+
|
209
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#65
|
210
|
+
def alphanumeric_encoding_start(length); end
|
211
|
+
|
212
|
+
# Returns the value of attribute buffer.
|
213
|
+
#
|
214
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#15
|
215
|
+
def buffer; end
|
216
|
+
|
217
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#58
|
218
|
+
def byte_encoding_start(length); end
|
219
|
+
|
220
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#92
|
221
|
+
def end_of_message(max_data_bits); end
|
222
|
+
|
223
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#27
|
224
|
+
def get(index); end
|
225
|
+
|
226
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#40
|
227
|
+
def get_length_in_bits; end
|
228
|
+
|
229
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#72
|
230
|
+
def numeric_encoding_start(length); end
|
231
|
+
|
232
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#79
|
233
|
+
def pad_until(prefered_size); end
|
234
|
+
|
235
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#33
|
236
|
+
def put(num, length); end
|
237
|
+
|
238
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#45
|
239
|
+
def put_bit(bit); end
|
240
|
+
end
|
241
|
+
|
242
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#17
|
243
|
+
RQRCode::QRBitBuffer::PAD0 = T.let(T.unsafe(nil), Integer)
|
244
|
+
|
245
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_bit_buffer.rb#18
|
246
|
+
RQRCode::QRBitBuffer::PAD1 = T.let(T.unsafe(nil), Integer)
|
247
|
+
|
248
|
+
# == Creation
|
249
|
+
#
|
250
|
+
# QRCode objects expect only one required constructor parameter
|
251
|
+
# and an optional hash of any other. Here's a few examples:
|
252
|
+
#
|
253
|
+
# qr = RQRCode::QRCode.new('hello world')
|
254
|
+
# qr = RQRCode::QRCode.new('hello world', :size => 1, :level => :m, :mode => :alphanumeric )
|
255
|
+
#
|
256
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#164
|
257
|
+
class RQRCode::QRCode
|
258
|
+
include ::RQRCode::Export::PNG
|
259
|
+
include ::RQRCode::Export::SVG
|
260
|
+
include ::RQRCode::Export::HTML
|
261
|
+
include ::RQRCode::Export::ANSI
|
262
|
+
|
263
|
+
# Expects a string to be parsed in, other args are optional
|
264
|
+
#
|
265
|
+
# # string - the string you wish to encode
|
266
|
+
# # size - the size of the qrcode (default 4)
|
267
|
+
# # level - the error correction level, can be:
|
268
|
+
# * Level :l 7% of code can be restored
|
269
|
+
# * Level :m 15% of code can be restored
|
270
|
+
# * Level :q 25% of code can be restored
|
271
|
+
# * Level :h 30% of code can be restored (default :h)
|
272
|
+
# # mode - the mode of the qrcode (defaults to alphanumeric or byte_8bit, depending on the input data):
|
273
|
+
# * :number
|
274
|
+
# * :alphanumeric
|
275
|
+
# * :byte_8bit
|
276
|
+
# * :kanji
|
277
|
+
#
|
278
|
+
# qr = RQRCode::QRCode.new('hello world', :size => 1, :level => :m, :mode => :alphanumeric )
|
279
|
+
#
|
280
|
+
# @return [QRCode] a new instance of QRCode
|
281
|
+
#
|
282
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#185
|
283
|
+
def initialize(string, *args); end
|
284
|
+
|
285
|
+
# <tt>is_dark</tt> is called with a +col+ and +row+ parameter. This will
|
286
|
+
# return true or false based on whether that coordinate exists in the
|
287
|
+
# matrix returned. It would normally be called while iterating through
|
288
|
+
# <tt>modules</tt>. A simple example would be:
|
289
|
+
#
|
290
|
+
# instance.is_dark( 10, 10 ) => true
|
291
|
+
#
|
292
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#243
|
293
|
+
def dark?(row, col); end
|
294
|
+
|
295
|
+
# Return a symbol for current error connection level
|
296
|
+
#
|
297
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#293
|
298
|
+
def error_correction_level; end
|
299
|
+
|
300
|
+
# <tt>is_dark</tt> is called with a +col+ and +row+ parameter. This will
|
301
|
+
# return true or false based on whether that coordinate exists in the
|
302
|
+
# matrix returned. It would normally be called while iterating through
|
303
|
+
# <tt>modules</tt>. A simple example would be:
|
304
|
+
#
|
305
|
+
# instance.is_dark( 10, 10 ) => true
|
306
|
+
#
|
307
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#243
|
308
|
+
def is_dark(row, col); end
|
309
|
+
|
310
|
+
# Return a symbol in QRMODE.keys for current mode used
|
311
|
+
#
|
312
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#298
|
313
|
+
def mode; end
|
314
|
+
|
315
|
+
# Returns the value of attribute module_count.
|
316
|
+
#
|
317
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#165
|
318
|
+
def module_count; end
|
319
|
+
|
320
|
+
# Returns the value of attribute modules.
|
321
|
+
#
|
322
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#165
|
323
|
+
def modules; end
|
324
|
+
|
325
|
+
# This is a public method that returns the QR Code you have
|
326
|
+
# generated as a string. It will not be able to be read
|
327
|
+
# in this format by a QR Code reader, but will give you an
|
328
|
+
# idea if the final outout. It takes two optional args
|
329
|
+
# +:true+ and +:false+ which are there for you to choose
|
330
|
+
# how the output looks. Here's an example of it's use:
|
331
|
+
#
|
332
|
+
# instance.to_s =>
|
333
|
+
# xxxxxxx x x x x x xx xxxxxxx
|
334
|
+
# x x xxx xxxxxx xxx x x
|
335
|
+
# x xxx x xxxxx x xx x xxx x
|
336
|
+
#
|
337
|
+
# instance._to_s( :dark => 'E', :light => 'Q') =>
|
338
|
+
# EEEEEEEQEQQEQEQQQEQEQQEEQQEEEEEEE
|
339
|
+
# EQQQQQEQQEEEQQEEEEEEQEEEQQEQQQQQE
|
340
|
+
# EQEEEQEQQEEEEEQEQQQQQQQEEQEQEEEQE
|
341
|
+
#
|
342
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#269
|
343
|
+
def to_s(*args); end
|
344
|
+
|
345
|
+
# Returns the value of attribute version.
|
346
|
+
#
|
347
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#165
|
348
|
+
def version; end
|
349
|
+
|
350
|
+
protected
|
351
|
+
|
352
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#311
|
353
|
+
def make; end
|
354
|
+
|
355
|
+
private
|
356
|
+
|
357
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#364
|
358
|
+
def get_best_mask_pattern; end
|
359
|
+
|
360
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#330
|
361
|
+
def make_impl(test, mask_pattern); end
|
362
|
+
|
363
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#450
|
364
|
+
def map_data(data, mask_pattern); end
|
365
|
+
|
366
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#417
|
367
|
+
def place_format_info(test, mask_pattern); end
|
368
|
+
|
369
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#388
|
370
|
+
def place_position_adjust_pattern; end
|
371
|
+
|
372
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#346
|
373
|
+
def place_position_probe_pattern(row, col); end
|
374
|
+
|
375
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#381
|
376
|
+
def place_timing_pattern; end
|
377
|
+
|
378
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#406
|
379
|
+
def place_version_info(test); end
|
380
|
+
|
381
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#318
|
382
|
+
def prepare_common_patterns; end
|
383
|
+
|
384
|
+
# @raise [QRCodeRunTimeError]
|
385
|
+
#
|
386
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#490
|
387
|
+
def smallest_size_for(string, max_size_array); end
|
388
|
+
|
389
|
+
class << self
|
390
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#497
|
391
|
+
def count_max_data_bits(rs_blocks); end
|
392
|
+
|
393
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#523
|
394
|
+
def create_bytes(buffer, rs_blocks); end
|
395
|
+
|
396
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#505
|
397
|
+
def create_data(version, error_correct_level, data_list); end
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
# StandardErrors
|
402
|
+
#
|
403
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#152
|
404
|
+
class RQRCode::QRCodeArgumentError < ::ArgumentError; end
|
405
|
+
|
406
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#153
|
407
|
+
class RQRCode::QRCodeRunTimeError < ::RuntimeError; end
|
408
|
+
|
409
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#26
|
410
|
+
RQRCode::QRERRORCORRECTLEVEL = T.let(T.unsafe(nil), Hash)
|
411
|
+
|
412
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#58
|
413
|
+
RQRCode::QRFORMATINFOLENGTH = T.let(T.unsafe(nil), Integer)
|
414
|
+
|
415
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#44
|
416
|
+
RQRCode::QRMASKCOMPUTATIONS = T.let(T.unsafe(nil), Array)
|
417
|
+
|
418
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#33
|
419
|
+
RQRCode::QRMASKPATTERN = T.let(T.unsafe(nil), Hash)
|
420
|
+
|
421
|
+
# http://web.archive.org/web/20110710094955/http://www.denso-wave.com/qrcode/vertable1-e.html
|
422
|
+
# http://web.archive.org/web/20110710094955/http://www.denso-wave.com/qrcode/vertable2-e.html
|
423
|
+
# http://web.archive.org/web/20110710094955/http://www.denso-wave.com/qrcode/vertable3-e.html
|
424
|
+
# http://web.archive.org/web/20110710094955/http://www.denso-wave.com/qrcode/vertable4-e.html
|
425
|
+
# Each array contains levels max chars from level 1 to level 40
|
426
|
+
#
|
427
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#65
|
428
|
+
RQRCode::QRMAXDIGITS = T.let(T.unsafe(nil), Hash)
|
429
|
+
|
430
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#14
|
431
|
+
RQRCode::QRMODE = T.let(T.unsafe(nil), Hash)
|
432
|
+
|
433
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#20
|
434
|
+
RQRCode::QRMODE_NAME = T.let(T.unsafe(nil), Hash)
|
435
|
+
|
436
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_math.rb#14
|
437
|
+
class RQRCode::QRMath
|
438
|
+
class << self
|
439
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_math.rb#47
|
440
|
+
def gexp(n); end
|
441
|
+
|
442
|
+
# @raise [QRCodeRunTimeError]
|
443
|
+
#
|
444
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_math.rb#41
|
445
|
+
def glog(n); end
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_math.rb#35
|
450
|
+
RQRCode::QRMath::EXP_TABLE = T.let(T.unsafe(nil), Array)
|
451
|
+
|
452
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_math.rb#36
|
453
|
+
RQRCode::QRMath::LOG_TABLE = T.let(T.unsafe(nil), Array)
|
454
|
+
|
455
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#5
|
456
|
+
class RQRCode::QRNumeric
|
457
|
+
# @raise [QRCodeArgumentError]
|
458
|
+
# @return [QRNumeric] a new instance of QRNumeric
|
459
|
+
#
|
460
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#8
|
461
|
+
def initialize(data); end
|
462
|
+
|
463
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#17
|
464
|
+
def get_length; end
|
465
|
+
|
466
|
+
# Returns the value of attribute mode.
|
467
|
+
#
|
468
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#6
|
469
|
+
def mode; end
|
470
|
+
|
471
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#29
|
472
|
+
def write(buffer); end
|
473
|
+
|
474
|
+
private
|
475
|
+
|
476
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#49
|
477
|
+
def get_bit_length(length); end
|
478
|
+
|
479
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#53
|
480
|
+
def get_code(chars); end
|
481
|
+
|
482
|
+
class << self
|
483
|
+
# @return [Boolean]
|
484
|
+
#
|
485
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#21
|
486
|
+
def valid_data?(data); end
|
487
|
+
end
|
488
|
+
end
|
489
|
+
|
490
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_numeric.rb#43
|
491
|
+
RQRCode::QRNumeric::NUMBER_LENGTH = T.let(T.unsafe(nil), Hash)
|
492
|
+
|
493
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_code.rb#57
|
494
|
+
RQRCode::QRPOSITIONPATTERNLENGTH = T.let(T.unsafe(nil), Integer)
|
495
|
+
|
496
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_polynomial.rb#14
|
497
|
+
class RQRCode::QRPolynomial
|
498
|
+
# @raise [QRCodeRunTimeError]
|
499
|
+
# @return [QRPolynomial] a new instance of QRPolynomial
|
500
|
+
#
|
501
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_polynomial.rb#16
|
502
|
+
def initialize(num, shift); end
|
503
|
+
|
504
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_polynomial.rb#32
|
505
|
+
def get(index); end
|
506
|
+
|
507
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_polynomial.rb#37
|
508
|
+
def get_length; end
|
509
|
+
|
510
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_polynomial.rb#56
|
511
|
+
def mod(e); end
|
512
|
+
|
513
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_polynomial.rb#42
|
514
|
+
def multiply(e); end
|
515
|
+
end
|
516
|
+
|
517
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#14
|
518
|
+
class RQRCode::QRRSBlock
|
519
|
+
# @return [QRRSBlock] a new instance of QRRSBlock
|
520
|
+
#
|
521
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#17
|
522
|
+
def initialize(total_count, data_count); end
|
523
|
+
|
524
|
+
# Returns the value of attribute data_count.
|
525
|
+
#
|
526
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#15
|
527
|
+
def data_count; end
|
528
|
+
|
529
|
+
# Returns the value of attribute total_count.
|
530
|
+
#
|
531
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#15
|
532
|
+
def total_count; end
|
533
|
+
|
534
|
+
class << self
|
535
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#297
|
536
|
+
def get_rs_block_table(version, error_correct_level); end
|
537
|
+
|
538
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#272
|
539
|
+
def get_rs_blocks(version, error_correct_level); end
|
540
|
+
end
|
541
|
+
end
|
542
|
+
|
543
|
+
# http://www.thonky.com/qr-code-tutorial/error-correction-table/
|
544
|
+
#
|
545
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_rs_block.rb#23
|
546
|
+
RQRCode::QRRSBlock::RS_BLOCK_TABLE = T.let(T.unsafe(nil), Array)
|
547
|
+
|
548
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#14
|
549
|
+
class RQRCode::QRUtil
|
550
|
+
class << self
|
551
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#169
|
552
|
+
def demerit_points_1_same_color(modules); end
|
553
|
+
|
554
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#200
|
555
|
+
def demerit_points_2_full_blocks(modules); end
|
556
|
+
|
557
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#221
|
558
|
+
def demerit_points_3_dangerous_patterns(modules); end
|
559
|
+
|
560
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#257
|
561
|
+
def demerit_points_4_dark_ratio(modules); end
|
562
|
+
|
563
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#98
|
564
|
+
def get_bch_digit(data); end
|
565
|
+
|
566
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#80
|
567
|
+
def get_bch_format_info(data); end
|
568
|
+
|
569
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#89
|
570
|
+
def get_bch_version(data); end
|
571
|
+
|
572
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#124
|
573
|
+
def get_error_correct_polynomial(error_correct_length); end
|
574
|
+
|
575
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#135
|
576
|
+
def get_length_in_bits(mode, version); end
|
577
|
+
|
578
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#158
|
579
|
+
def get_lost_points(modules); end
|
580
|
+
|
581
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#115
|
582
|
+
def get_mask(mask_pattern, i, j); end
|
583
|
+
|
584
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#110
|
585
|
+
def get_pattern_positions(version); end
|
586
|
+
|
587
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#76
|
588
|
+
def max_size; end
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#69
|
593
|
+
RQRCode::QRUtil::BITS_FOR_MODE = T.let(T.unsafe(nil), Hash)
|
594
|
+
|
595
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#64
|
596
|
+
RQRCode::QRUtil::DEMERIT_POINTS_1 = T.let(T.unsafe(nil), Integer)
|
597
|
+
|
598
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#65
|
599
|
+
RQRCode::QRUtil::DEMERIT_POINTS_2 = T.let(T.unsafe(nil), Integer)
|
600
|
+
|
601
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#66
|
602
|
+
RQRCode::QRUtil::DEMERIT_POINTS_3 = T.let(T.unsafe(nil), Integer)
|
603
|
+
|
604
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#67
|
605
|
+
RQRCode::QRUtil::DEMERIT_POINTS_4 = T.let(T.unsafe(nil), Integer)
|
606
|
+
|
607
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#60
|
608
|
+
RQRCode::QRUtil::G15 = T.let(T.unsafe(nil), Integer)
|
609
|
+
|
610
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#62
|
611
|
+
RQRCode::QRUtil::G15_MASK = T.let(T.unsafe(nil), Integer)
|
612
|
+
|
613
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#61
|
614
|
+
RQRCode::QRUtil::G18 = T.let(T.unsafe(nil), Integer)
|
615
|
+
|
616
|
+
# source://rqrcode//lib/rqrcode/qrcode/qr_util.rb#16
|
617
|
+
RQRCode::QRUtil::PATTERN_POSITION_TABLE = T.let(T.unsafe(nil), Array)
|