pdf-reader 2.7.0 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +20 -0
- data/Rakefile +1 -1
- data/lib/pdf/reader/aes_v2_security_handler.rb +41 -0
- data/lib/pdf/reader/aes_v3_security_handler.rb +38 -0
- data/lib/pdf/reader/bounding_rectangle_runs_filter.rb +16 -0
- data/lib/pdf/reader/buffer.rb +36 -34
- data/lib/pdf/reader/cmap.rb +64 -51
- data/lib/pdf/reader/error.rb +8 -0
- data/lib/pdf/reader/filter/ascii85.rb +1 -1
- data/lib/pdf/reader/filter/ascii_hex.rb +1 -1
- data/lib/pdf/reader/filter/depredict.rb +1 -1
- data/lib/pdf/reader/filter/flate.rb +3 -3
- data/lib/pdf/reader/filter/lzw.rb +1 -1
- data/lib/pdf/reader/filter/null.rb +1 -2
- data/lib/pdf/reader/filter/run_length.rb +1 -1
- data/lib/pdf/reader/filter.rb +10 -11
- data/lib/pdf/reader/font.rb +71 -16
- data/lib/pdf/reader/font_descriptor.rb +18 -17
- data/lib/pdf/reader/form_xobject.rb +14 -5
- data/lib/pdf/reader/key_builder_v5.rb +138 -0
- data/lib/pdf/reader/null_security_handler.rb +0 -4
- data/lib/pdf/reader/object_hash.rb +251 -44
- data/lib/pdf/reader/page.rb +51 -22
- data/lib/pdf/reader/page_layout.rb +14 -28
- data/lib/pdf/reader/page_state.rb +1 -1
- data/lib/pdf/reader/page_text_receiver.rb +52 -10
- data/lib/pdf/reader/parser.rb +22 -7
- data/lib/pdf/reader/point.rb +1 -1
- data/lib/pdf/reader/rc4_security_handler.rb +38 -0
- data/lib/pdf/reader/rectangle.rb +20 -2
- data/lib/pdf/reader/{resource_methods.rb → resources.rb} +15 -13
- data/lib/pdf/reader/security_handler_factory.rb +79 -0
- data/lib/pdf/reader/{standard_security_handler.rb → standard_key_builder.rb} +23 -95
- data/lib/pdf/reader/stream.rb +2 -2
- data/lib/pdf/reader/text_run.rb +13 -6
- data/lib/pdf/reader/type_check.rb +52 -0
- data/lib/pdf/reader/validating_receiver.rb +262 -0
- data/lib/pdf/reader/width_calculator/true_type.rb +1 -1
- data/lib/pdf/reader/xref.rb +20 -3
- data/lib/pdf/reader.rb +32 -11
- data/rbi/pdf-reader.rbi +408 -174
- metadata +16 -9
- data/lib/pdf/reader/standard_security_handler_v5.rb +0 -92
data/rbi/pdf-reader.rbi
CHANGED
@@ -43,6 +43,32 @@ module PDF
|
|
43
43
|
sig { returns(T::Hash[Symbol, T.untyped]) }
|
44
44
|
def root; end
|
45
45
|
|
46
|
+
class AesV2SecurityHandler
|
47
|
+
sig { params(key: String).void }
|
48
|
+
def initialize(key)
|
49
|
+
@encrypt_key = T.let(T.unsafe(nil), String)
|
50
|
+
end
|
51
|
+
|
52
|
+
sig { params(buf: String, ref: PDF::Reader::Reference).returns(String) }
|
53
|
+
def decrypt(buf, ref); end
|
54
|
+
end
|
55
|
+
|
56
|
+
class AesV3SecurityHandler
|
57
|
+
sig { params(key: String).void }
|
58
|
+
def initialize(key)
|
59
|
+
@encrypt_key = T.let(T.unsafe(nil), String)
|
60
|
+
@cipher = T.let(T.unsafe(nil), String)
|
61
|
+
end
|
62
|
+
|
63
|
+
sig { params(buf: String, ref: PDF::Reader::Reference).returns(String) }
|
64
|
+
def decrypt(buf, ref); end
|
65
|
+
end
|
66
|
+
|
67
|
+
class BoundingRectangleRunsFilter
|
68
|
+
sig { params(runs: T::Array[PDF::Reader::TextRun], rect: PDF::Reader::Rectangle).returns(T::Array[PDF::Reader::TextRun]) }
|
69
|
+
def self.runs_within_rect(runs, rect); end
|
70
|
+
end
|
71
|
+
|
46
72
|
class Buffer
|
47
73
|
TOKEN_WHITESPACE = [0x00, 0x09, 0x0A, 0x0C, 0x0D, 0x20]
|
48
74
|
TOKEN_DELIMITER = [0x25, 0x3C, 0x3E, 0x28, 0x5B, 0x7B, 0x29, 0x5D, 0x7D, 0x2F]
|
@@ -58,67 +84,67 @@ module PDF
|
|
58
84
|
WHITE_SPACE = [LF, CR, ' ']
|
59
85
|
TRAILING_BYTECOUNT = 5000
|
60
86
|
|
61
|
-
sig { returns(
|
87
|
+
sig { returns(Integer) }
|
62
88
|
attr_reader :pos
|
63
89
|
|
64
|
-
sig { params(io: T.
|
65
|
-
def initialize(io, opts = {})
|
90
|
+
sig { params(io: T.any(StringIO, File), opts: T::Hash[Symbol, T.untyped]).void }
|
91
|
+
def initialize(io, opts = {})
|
92
|
+
@pos = T.let(T.unsafe(nil), Integer)
|
93
|
+
@tokens = T.let(T.unsafe(nil), T::Array[T.any(String, PDF::Reader::Reference)])
|
94
|
+
@io = T.let(T.unsafe(nil), T.any(StringIO, File))
|
95
|
+
@in_content_stream = T.let(T.unsafe(nil), T::Boolean)
|
96
|
+
end
|
66
97
|
|
67
|
-
sig { returns(T
|
98
|
+
sig { returns(T::Boolean) }
|
68
99
|
def empty?; end
|
69
100
|
|
70
|
-
sig { params(bytes:
|
101
|
+
sig { params(bytes: Integer, opts: T::Hash[Symbol, T.untyped]).returns(T.nilable(String)) }
|
71
102
|
def read(bytes, opts = {}); end
|
72
103
|
|
73
|
-
sig { returns(T.
|
104
|
+
sig { returns(T.any(NilClass, String, PDF::Reader::Reference)) }
|
74
105
|
def token; end
|
75
106
|
|
76
|
-
sig { returns(
|
107
|
+
sig { returns(Integer) }
|
77
108
|
def find_first_xref_offset; end
|
78
109
|
|
79
|
-
sig {
|
110
|
+
sig { void }
|
80
111
|
def check_size_is_non_zero; end
|
81
112
|
|
82
|
-
sig { returns(T
|
113
|
+
sig { returns(T::Boolean) }
|
83
114
|
def in_content_stream?; end
|
84
115
|
|
85
|
-
sig {
|
116
|
+
sig { void }
|
86
117
|
def reset_pos; end
|
87
118
|
|
88
|
-
sig {
|
119
|
+
sig { void }
|
89
120
|
def save_pos; end
|
90
121
|
|
91
|
-
sig {
|
122
|
+
sig { void }
|
92
123
|
def prepare_tokens; end
|
93
124
|
|
94
|
-
sig { returns(
|
125
|
+
sig { returns(Symbol) }
|
95
126
|
def state; end
|
96
127
|
|
97
|
-
sig {
|
128
|
+
sig { void }
|
98
129
|
def merge_indirect_reference; end
|
99
130
|
|
100
|
-
sig {
|
131
|
+
sig { void }
|
101
132
|
def prepare_inline_token; end
|
102
133
|
|
103
|
-
sig {
|
134
|
+
sig { void }
|
104
135
|
def prepare_hex_token; end
|
105
136
|
|
106
|
-
sig {
|
137
|
+
sig { void }
|
107
138
|
def prepare_literal_token; end
|
108
139
|
|
109
|
-
sig {
|
140
|
+
sig { void }
|
110
141
|
def prepare_regular_token; end
|
111
142
|
|
112
|
-
sig { returns(T.
|
143
|
+
sig { returns(T.nilable(Integer)) }
|
113
144
|
def peek_byte; end
|
114
|
-
|
115
|
-
sig { params(token: T.untyped).returns(T.untyped) }
|
116
|
-
def string_token(token); end
|
117
145
|
end
|
118
146
|
|
119
147
|
class CidWidths
|
120
|
-
extend Forwardable
|
121
|
-
|
122
148
|
sig { params(default: T.untyped, array: T.untyped).void }
|
123
149
|
def initialize(default, array); end
|
124
150
|
|
@@ -133,7 +159,6 @@ module PDF
|
|
133
159
|
end
|
134
160
|
|
135
161
|
class CMap
|
136
|
-
extend T::Sig
|
137
162
|
CMAP_KEYWORDS = {
|
138
163
|
"begincodespacerange" => 1,
|
139
164
|
"endcodespacerange" => 1,
|
@@ -150,33 +175,35 @@ module PDF
|
|
150
175
|
attr_reader :map
|
151
176
|
|
152
177
|
sig { params(data: String).void }
|
153
|
-
def initialize(data)
|
178
|
+
def initialize(data)
|
179
|
+
@map = T.let(T.unsafe(nil), T::Hash[Integer, T::Array[Integer]])
|
180
|
+
end
|
154
181
|
|
155
|
-
sig { params(data: String).void }
|
156
|
-
def process_data(data); end
|
182
|
+
sig { params(data: String, initial_mode: Symbol).void }
|
183
|
+
def process_data(data, initial_mode = :none); end
|
157
184
|
|
158
185
|
sig { returns(Integer) }
|
159
186
|
def size; end
|
160
187
|
|
161
|
-
sig { params(c:
|
188
|
+
sig { params(c: Integer).returns(T::Array[Integer]) }
|
162
189
|
def decode(c); end
|
163
190
|
|
164
|
-
sig { params(instructions:
|
191
|
+
sig { params(instructions: String).returns(PDF::Reader::Parser) }
|
165
192
|
def build_parser(instructions); end
|
166
193
|
|
167
|
-
sig { params(str:
|
194
|
+
sig { params(str: String).returns(T::Array[Integer]) }
|
168
195
|
def str_to_int(str); end
|
169
196
|
|
170
|
-
sig { params(instructions: T
|
197
|
+
sig { params(instructions: T::Array[String]).void }
|
171
198
|
def process_bfchar_instructions(instructions); end
|
172
199
|
|
173
|
-
sig { params(instructions: T.
|
200
|
+
sig { params(instructions: T::Array[T.any(T::Array[String], String)]).void }
|
174
201
|
def process_bfrange_instructions(instructions); end
|
175
202
|
|
176
|
-
sig { params(start_code:
|
203
|
+
sig { params(start_code: String, end_code: String, dst: String).void }
|
177
204
|
def bfrange_type_one(start_code, end_code, dst); end
|
178
205
|
|
179
|
-
sig { params(start_code:
|
206
|
+
sig { params(start_code: String, end_code: String, dst: T::Array[String]).void }
|
180
207
|
def bfrange_type_two(start_code, end_code, dst); end
|
181
208
|
end
|
182
209
|
|
@@ -197,13 +224,13 @@ module PDF
|
|
197
224
|
sig { returns(T.untyped) }
|
198
225
|
def differences; end
|
199
226
|
|
200
|
-
sig { params(str:
|
227
|
+
sig { params(str: String).returns(String) }
|
201
228
|
def to_utf8(str); end
|
202
229
|
|
203
|
-
sig { params(glyph_code:
|
230
|
+
sig { params(glyph_code: Integer).returns(String) }
|
204
231
|
def int_to_utf8_string(glyph_code); end
|
205
232
|
|
206
|
-
sig { params(glyph_code:
|
233
|
+
sig { params(glyph_code: Integer).returns(T::Array[Symbol]) }
|
207
234
|
def int_to_name(glyph_code); end
|
208
235
|
|
209
236
|
sig { returns(T.untyped) }
|
@@ -247,8 +274,14 @@ module PDF
|
|
247
274
|
sig { params(object: Object, name: String, klass: Module).void }
|
248
275
|
def self.validate_type(object, name, klass); end
|
249
276
|
|
277
|
+
sig { params(object: Object, name: String, klass: Module).void }
|
278
|
+
def self.validate_type_as_malformed(object, name, klass); end
|
279
|
+
|
250
280
|
sig { params(object: Object, name: String).void }
|
251
281
|
def self.validate_not_nil(object, name); end
|
282
|
+
|
283
|
+
sig { params(object: Object, name: String).void }
|
284
|
+
def self.validate_not_nil_as_malformed(object, name); end
|
252
285
|
end
|
253
286
|
|
254
287
|
class MalformedPDFError < RuntimeError
|
@@ -383,7 +416,7 @@ module PDF
|
|
383
416
|
sig { returns(T.untyped) }
|
384
417
|
attr_reader :font_flags
|
385
418
|
|
386
|
-
sig { params(ohash:
|
419
|
+
sig { params(ohash: PDF::Reader::ObjectHash, fd_hash: T::Hash[T.untyped, T.untyped]).void }
|
387
420
|
def initialize(ohash, fd_hash); end
|
388
421
|
|
389
422
|
sig { params(char_code: T.untyped).returns(T.untyped) }
|
@@ -447,6 +480,38 @@ module PDF
|
|
447
480
|
def load_adobe_glyph_mapping; end
|
448
481
|
end
|
449
482
|
|
483
|
+
class KeyBuilderV5
|
484
|
+
sig { params(opts: T::Hash[Symbol, String]).void }
|
485
|
+
def initialize(opts = {})
|
486
|
+
@key_length = T.let(T.unsafe(nil), Integer)
|
487
|
+
@owner_key = T.let(T.unsafe(nil), String)
|
488
|
+
@user_key = T.let(T.unsafe(nil), String)
|
489
|
+
@owner_encryption_key = T.let(T.unsafe(nil), String)
|
490
|
+
@user_encryption_key = T.let(T.unsafe(nil), String)
|
491
|
+
end
|
492
|
+
|
493
|
+
sig { params(pass: String).returns(String) }
|
494
|
+
def key(pass); end
|
495
|
+
|
496
|
+
sig { params(password: T.untyped).returns(T.untyped) }
|
497
|
+
def auth_owner_pass(password); end
|
498
|
+
|
499
|
+
sig { params(password: T.untyped).returns(T.untyped) }
|
500
|
+
def auth_user_pass(password); end
|
501
|
+
|
502
|
+
sig { params(password: String).returns(T.nilable(String)) }
|
503
|
+
def auth_owner_pass_r6(password); end
|
504
|
+
|
505
|
+
sig { params(password: String).returns(T.nilable(String)) }
|
506
|
+
def auth_user_pass_r6(password); end
|
507
|
+
|
508
|
+
sig { params(password: String, salt: String, user_key: String).returns(String)}
|
509
|
+
def r6_digest(password, salt, user_key = ''); end
|
510
|
+
|
511
|
+
sig { params(str: String).returns(Integer)}
|
512
|
+
def unpack_128bit_bigendian_int(str); end
|
513
|
+
end
|
514
|
+
|
450
515
|
class LZW
|
451
516
|
CODE_EOD = 257
|
452
517
|
CODE_CLEAR_TABLE = 256
|
@@ -484,9 +549,6 @@ module PDF
|
|
484
549
|
end
|
485
550
|
|
486
551
|
class NullSecurityHandler
|
487
|
-
sig { params(encrypt: T.untyped).returns(T.untyped) }
|
488
|
-
def self.supports?(encrypt); end
|
489
|
-
|
490
552
|
sig { params(buf: T.untyped, _ref: T.untyped).returns(T.untyped) }
|
491
553
|
def decrypt(buf, _ref); end
|
492
554
|
end
|
@@ -579,9 +641,45 @@ module PDF
|
|
579
641
|
sig { params(key: T.untyped).returns(T.untyped) }
|
580
642
|
def object(key); end
|
581
643
|
|
644
|
+
sig { params(key: T.untyped).returns(T.nilable(T::Array[T.untyped])) }
|
645
|
+
def deref_array(key); end
|
646
|
+
|
647
|
+
sig { params(key: T.untyped).returns(T.nilable(T::Array[Numeric])) }
|
648
|
+
def deref_array_of_numbers(key); end
|
649
|
+
|
650
|
+
sig { params(key: T.untyped).returns(T.nilable(T:Hash[Symbol, T.untyped])) }
|
651
|
+
def deref_hash(key); end
|
652
|
+
|
653
|
+
sig { params(key: T.untyped).returns(T.nilable(Symbol)) }
|
654
|
+
def deref_name(key); end
|
655
|
+
|
656
|
+
sig { params(key: T.untyped).returns(T.any(Symbol, T::Array[T.untyped], NilClass)) }
|
657
|
+
def deref_name_or_array(key); end
|
658
|
+
|
659
|
+
sig { params(key: T.untyped).returns(T.nilable(Integer)) }
|
660
|
+
def deref_integer(key); end
|
661
|
+
|
662
|
+
sig { params(key: T.untyped).returns(T.nilable(Numeric)) }
|
663
|
+
def deref_number(key); end
|
664
|
+
|
665
|
+
sig { params(key: T.untyped).returns(T.nilable(PDF::Reader::Stream)) }
|
666
|
+
def deref_stream(key); end
|
667
|
+
|
668
|
+
sig { params(key: T.untyped).returns(T.nilable(String)) }
|
669
|
+
def deref_string(key); end
|
670
|
+
|
671
|
+
sig { params(key: T.untyped).returns(T.any(PDF::Reader::Stream, T::Array[T.untyped], NilClass)) }
|
672
|
+
def deref_stream_or_array(key); end
|
673
|
+
|
582
674
|
sig { params(key: T.untyped).returns(T.untyped) }
|
583
675
|
def deref!(key); end
|
584
676
|
|
677
|
+
sig { params(key: T.untyped).returns(T::Array[T.untyped]) }
|
678
|
+
def deref_array!(key); end
|
679
|
+
|
680
|
+
sig { params(key: T.untyped).returns(T::Hash[Symbol, T.untyped]) }
|
681
|
+
def deref_hash!(key); end
|
682
|
+
|
585
683
|
sig { params(key: T.untyped, local_default: T.untyped).returns(T.untyped) }
|
586
684
|
def fetch(key, local_default = nil); end
|
587
685
|
|
@@ -594,22 +692,22 @@ module PDF
|
|
594
692
|
sig { params(block: T.untyped).returns(T.untyped) }
|
595
693
|
def each_value(&block); end
|
596
694
|
|
597
|
-
sig { returns(
|
695
|
+
sig { returns(Integer) }
|
598
696
|
def size; end
|
599
697
|
|
600
|
-
sig { returns(T
|
698
|
+
sig { returns(T::Boolean) }
|
601
699
|
def empty?; end
|
602
700
|
|
603
|
-
sig { params(check_key: T.untyped).returns(T
|
701
|
+
sig { params(check_key: T.untyped).returns(T::Boolean) }
|
604
702
|
def has_key?(check_key); end
|
605
703
|
|
606
|
-
sig { params(value: T.untyped).returns(T
|
704
|
+
sig { params(value: T.untyped).returns(T::Boolean) }
|
607
705
|
def has_value?(value); end
|
608
706
|
|
609
|
-
sig { returns(
|
707
|
+
sig { returns(String) }
|
610
708
|
def to_s; end
|
611
709
|
|
612
|
-
sig { returns(T
|
710
|
+
sig { returns(T::Array[PDF::Reader::Reference]) }
|
613
711
|
def keys; end
|
614
712
|
|
615
713
|
sig { returns(T.untyped) }
|
@@ -621,13 +719,13 @@ module PDF
|
|
621
719
|
sig { returns(T.untyped) }
|
622
720
|
def to_a; end
|
623
721
|
|
624
|
-
sig { returns(T
|
722
|
+
sig { returns(T::Array[PDF::Reader::Reference]) }
|
625
723
|
def page_references; end
|
626
724
|
|
627
|
-
sig { returns(T
|
725
|
+
sig { returns(T::Boolean) }
|
628
726
|
def encrypted?; end
|
629
727
|
|
630
|
-
sig { returns(T
|
728
|
+
sig { returns(T::Boolean) }
|
631
729
|
def sec_handler?; end
|
632
730
|
|
633
731
|
sig { params(key: T.untyped).returns(T.untyped) }
|
@@ -639,13 +737,10 @@ module PDF
|
|
639
737
|
sig { params(key: T.untyped, seen: T.untyped).returns(T.untyped) }
|
640
738
|
def deref_internal!(key, seen); end
|
641
739
|
|
642
|
-
sig { params(opts: T.untyped).returns(T.untyped) }
|
643
|
-
def build_security_handler(opts = {}); end
|
644
|
-
|
645
740
|
sig { params(ref: T.untyped, obj: T.untyped).returns(T.untyped) }
|
646
741
|
def decrypt(ref, obj); end
|
647
742
|
|
648
|
-
sig { params(offset:
|
743
|
+
sig { params(offset: Integer).returns(PDF::Reader::Buffer) }
|
649
744
|
def new_buffer(offset = 0); end
|
650
745
|
|
651
746
|
sig { returns(T.untyped) }
|
@@ -654,13 +749,13 @@ module PDF
|
|
654
749
|
sig { returns(T.untyped) }
|
655
750
|
def object_streams; end
|
656
751
|
|
657
|
-
sig { params(
|
658
|
-
def get_page_objects(
|
752
|
+
sig { params(obj: T::Hash[T.untyped, T.untyped]).returns(T::Array[T::Hash[T.untyped, T.untyped]]) }
|
753
|
+
def get_page_objects(obj); end
|
659
754
|
|
660
|
-
sig { returns(
|
755
|
+
sig { returns(Float) }
|
661
756
|
def read_version; end
|
662
757
|
|
663
|
-
sig { params(input: T.untyped).returns(
|
758
|
+
sig { params(input: T.untyped).returns(IO) }
|
664
759
|
def extract_io_from(input); end
|
665
760
|
|
666
761
|
sig { params(input: T.untyped).returns(T.untyped) }
|
@@ -688,7 +783,6 @@ module PDF
|
|
688
783
|
end
|
689
784
|
|
690
785
|
class OverlappingRunsFilter
|
691
|
-
extend T::Sig
|
692
786
|
OVERLAPPING_THRESHOLD = 0.5
|
693
787
|
|
694
788
|
sig { params(runs: T::Array[PDF::Reader::TextRun]).returns(T::Array[PDF::Reader::TextRun]) }
|
@@ -699,8 +793,6 @@ module PDF
|
|
699
793
|
end
|
700
794
|
|
701
795
|
class EventPoint
|
702
|
-
extend T::Sig
|
703
|
-
|
704
796
|
sig { returns(Numeric) }
|
705
797
|
attr_reader :x
|
706
798
|
|
@@ -750,8 +842,11 @@ module PDF
|
|
750
842
|
sig { returns(T::Array[Numeric]) }
|
751
843
|
def origin; end
|
752
844
|
|
753
|
-
sig { returns(
|
754
|
-
def
|
845
|
+
sig { params(opts: T::Hash[Symbol, T.untyped]).returns(T::Array[PDF::Reader::TextRun]) }
|
846
|
+
def runs(opts = {}); end
|
847
|
+
|
848
|
+
sig { params(opts: T::Hash[Symbol, T.untyped]).returns(String) }
|
849
|
+
def text(opts = {}); end
|
755
850
|
|
756
851
|
sig { params(receivers: T.untyped).void }
|
757
852
|
def walk(*receivers); end
|
@@ -771,7 +866,7 @@ module PDF
|
|
771
866
|
sig { returns(T::Hash[Symbol, T.untyped]) }
|
772
867
|
def root; end
|
773
868
|
|
774
|
-
sig { returns(
|
869
|
+
sig { returns(PDF::Reader::Resources) }
|
775
870
|
def resources; end
|
776
871
|
|
777
872
|
sig { params(receivers: T.untyped, instructions: T.untyped).returns(T.untyped) }
|
@@ -786,15 +881,14 @@ module PDF
|
|
786
881
|
sig { params(origin: T.untyped).returns(T.untyped) }
|
787
882
|
def ancestors(origin = @page_object[:Parent]); end
|
788
883
|
|
789
|
-
sig { params(obj: T.untyped).returns(T.untyped) }
|
884
|
+
sig { params(obj: T::Hash[T.untyped, T.untyped]).returns(T::Hash[Symbol, T.untyped]) }
|
790
885
|
def select_inheritable(obj); end
|
791
886
|
end
|
792
887
|
|
793
888
|
class PageLayout
|
794
|
-
extend T::Sig
|
795
889
|
DEFAULT_FONT_SIZE = 12
|
796
890
|
|
797
|
-
sig { params(runs: T::Array[PDF::Reader::TextRun], mediabox: T::Array[Numeric]).void }
|
891
|
+
sig { params(runs: T::Array[PDF::Reader::TextRun], mediabox: T.any(T::Array[Numeric], PDF::Reader::Rectangle)).void }
|
798
892
|
def initialize(runs, mediabox); end
|
799
893
|
|
800
894
|
sig { returns(String) }
|
@@ -829,6 +923,9 @@ module PDF
|
|
829
923
|
|
830
924
|
sig { params(haystack: T.untyped, needle: T.untyped, index: T.untyped).returns(T.untyped) }
|
831
925
|
def local_string_insert(haystack, needle, index); end
|
926
|
+
|
927
|
+
sig { params(mediabox: T.untyped).returns(T.untyped) }
|
928
|
+
def process_mediabox(mediabox); end
|
832
929
|
end
|
833
930
|
|
834
931
|
class PageState
|
@@ -987,22 +1084,25 @@ module PDF
|
|
987
1084
|
sig { returns(T.untyped) }
|
988
1085
|
def content; end
|
989
1086
|
|
990
|
-
sig { params(string:
|
1087
|
+
sig { params(string: String).void }
|
991
1088
|
def show_text(string); end
|
992
1089
|
|
993
|
-
sig { params(params: T.untyped).
|
1090
|
+
sig { params(params: T::Array[T.untyped]).void }
|
994
1091
|
def show_text_with_positioning(params); end
|
995
1092
|
|
996
|
-
sig { params(str:
|
1093
|
+
sig { params(str: String).void }
|
997
1094
|
def move_to_next_line_and_show_text(str); end
|
998
1095
|
|
999
|
-
sig { params(
|
1096
|
+
sig { params(opts: T::Hash[Symbol, T.untyped]).returns(T::Array[PDF::Reader::TextRun]) }
|
1097
|
+
def runs(opts = {}); end
|
1098
|
+
|
1099
|
+
sig { params(aw: Numeric, ac: Numeric, string: String).void }
|
1000
1100
|
def set_spacing_next_line_show_text(aw, ac, string); end
|
1001
1101
|
|
1002
1102
|
sig { params(label: T.untyped).returns(T.untyped) }
|
1003
1103
|
def invoke_xobject(label); end
|
1004
1104
|
|
1005
|
-
sig { params(string:
|
1105
|
+
sig { params(string: String).void }
|
1006
1106
|
def internal_show_text(string); end
|
1007
1107
|
|
1008
1108
|
sig { params(x: T.untyped, y: T.untyped).returns(T.untyped) }
|
@@ -1087,6 +1187,48 @@ module PDF
|
|
1087
1187
|
}
|
1088
1188
|
end
|
1089
1189
|
|
1190
|
+
class Parser
|
1191
|
+
sig { params(buffer: PDF::Reader::Buffer, objects: T.nilable(PDF::Reader::ObjectHash)).void }
|
1192
|
+
def initialize(buffer, objects=nil); end
|
1193
|
+
|
1194
|
+
sig {
|
1195
|
+
params(
|
1196
|
+
operators: T::Hash[T.any(String, PDF::Reader::Token), Symbol]
|
1197
|
+
).returns(
|
1198
|
+
T.any(PDF::Reader::Reference, PDF::Reader::Token, Numeric, String, Symbol, T::Array[T.untyped], T::Hash[T.untyped, T.untyped], NilClass)
|
1199
|
+
)
|
1200
|
+
}
|
1201
|
+
def parse_token(operators={}); end
|
1202
|
+
|
1203
|
+
sig {
|
1204
|
+
params(
|
1205
|
+
id: Integer,
|
1206
|
+
gen: Integer
|
1207
|
+
).returns(
|
1208
|
+
T.any(PDF::Reader::Reference, PDF::Reader::Token, PDF::Reader::Stream, Numeric, String, Symbol, T::Array[T.untyped], T::Hash[T.untyped, T.untyped], NilClass)
|
1209
|
+
)
|
1210
|
+
}
|
1211
|
+
def object(id, gen); end
|
1212
|
+
|
1213
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
1214
|
+
def dictionary; end
|
1215
|
+
|
1216
|
+
sig { returns(Symbol) }
|
1217
|
+
def pdf_name; end
|
1218
|
+
|
1219
|
+
sig { returns(T::Array[T.untyped]) }
|
1220
|
+
def array; end
|
1221
|
+
|
1222
|
+
sig { returns(String) }
|
1223
|
+
def hex_string; end
|
1224
|
+
|
1225
|
+
sig { returns(String) }
|
1226
|
+
def string; end
|
1227
|
+
|
1228
|
+
sig { params(dict: T::Hash[Symbol, T.untyped]).returns(PDF::Reader::Stream) }
|
1229
|
+
def stream(dict); end
|
1230
|
+
end
|
1231
|
+
|
1090
1232
|
class Point
|
1091
1233
|
sig do
|
1092
1234
|
params(
|
@@ -1094,7 +1236,10 @@ module PDF
|
|
1094
1236
|
y: Numeric,
|
1095
1237
|
).void
|
1096
1238
|
end
|
1097
|
-
def initialize(x, y)
|
1239
|
+
def initialize(x, y)
|
1240
|
+
@x = T.let(T.unsafe(nil), Numeric)
|
1241
|
+
@y = T.let(T.unsafe(nil), Numeric)
|
1242
|
+
end
|
1098
1243
|
|
1099
1244
|
sig { returns(Numeric) }
|
1100
1245
|
def x; end
|
@@ -1121,7 +1266,21 @@ module PDF
|
|
1121
1266
|
def method_missing(methodname, *args); end
|
1122
1267
|
end
|
1123
1268
|
|
1269
|
+
class Rc4SecurityHandler
|
1270
|
+
sig { params(key: String).void }
|
1271
|
+
def initialize(key)
|
1272
|
+
@encrypt_key = T.let(T.unsafe(nil), String)
|
1273
|
+
end
|
1274
|
+
|
1275
|
+
sig { params(buf: T.untyped, ref: T.untyped).returns(T.untyped) }
|
1276
|
+
def decrypt(buf, ref); end
|
1277
|
+
end
|
1278
|
+
|
1124
1279
|
class Rectangle
|
1280
|
+
|
1281
|
+
sig { params(arr: T::Array[Numeric]).returns(PDF::Reader::Rectangle) }
|
1282
|
+
def self.from_array(arr); end
|
1283
|
+
|
1125
1284
|
sig do
|
1126
1285
|
params(
|
1127
1286
|
x1: Numeric,
|
@@ -1130,7 +1289,13 @@ module PDF
|
|
1130
1289
|
y2: Numeric
|
1131
1290
|
).void
|
1132
1291
|
end
|
1133
|
-
|
1292
|
+
|
1293
|
+
def initialize(x1, y1, x2, y2)
|
1294
|
+
@bottom_left = T.let(T.unsafe(nil), PDF::Reader::Point)
|
1295
|
+
@bottom_right = T.let(T.unsafe(nil), PDF::Reader::Point)
|
1296
|
+
@top_left = T.let(T.unsafe(nil), PDF::Reader::Point)
|
1297
|
+
@top_right = T.let(T.unsafe(nil), PDF::Reader::Point)
|
1298
|
+
end
|
1134
1299
|
|
1135
1300
|
sig { returns(PDF::Reader::Point) }
|
1136
1301
|
def bottom_left; end
|
@@ -1155,6 +1320,15 @@ module PDF
|
|
1155
1320
|
|
1156
1321
|
sig { params(degrees: Integer).void }
|
1157
1322
|
def apply_rotation(degrees); end
|
1323
|
+
|
1324
|
+
sig { params(point: PDF::Reader::Point).void }
|
1325
|
+
def contains?(point); end
|
1326
|
+
|
1327
|
+
sig { params(other: PDF::Reader::Rectangle).void }
|
1328
|
+
def ==(other); end
|
1329
|
+
|
1330
|
+
sig { params(x1: Numeric, y1: Numeric, x2: Numeric, y2: Numeric).void }
|
1331
|
+
def set_corners(x1, y1, x2, y2); end
|
1158
1332
|
end
|
1159
1333
|
|
1160
1334
|
class Reference
|
@@ -1218,7 +1392,7 @@ module PDF
|
|
1218
1392
|
sig { returns(T.untyped) }
|
1219
1393
|
def color_spaces; end
|
1220
1394
|
|
1221
|
-
sig { returns(T.untyped) }
|
1395
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
1222
1396
|
def fonts; end
|
1223
1397
|
|
1224
1398
|
sig { returns(T.untyped) }
|
@@ -1240,50 +1414,34 @@ module PDF
|
|
1240
1414
|
def xobjects; end
|
1241
1415
|
end
|
1242
1416
|
|
1243
|
-
class
|
1244
|
-
|
1245
|
-
|
1246
|
-
0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80,
|
1247
|
-
0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a ]
|
1248
|
-
|
1249
|
-
sig { returns(T.untyped) }
|
1250
|
-
attr_reader :key_length
|
1251
|
-
|
1252
|
-
sig { returns(T.untyped) }
|
1253
|
-
attr_reader :revision
|
1254
|
-
|
1255
|
-
sig { returns(T.untyped) }
|
1256
|
-
attr_reader :encrypt_key
|
1257
|
-
|
1258
|
-
sig { returns(T.untyped) }
|
1259
|
-
attr_reader :owner_key
|
1260
|
-
|
1261
|
-
sig { returns(T.untyped) }
|
1262
|
-
attr_reader :user_key
|
1263
|
-
|
1264
|
-
sig { returns(T.untyped) }
|
1265
|
-
attr_reader :permissions
|
1417
|
+
class SecurityHandlerFactory
|
1418
|
+
sig { params(encrypt: T.untyped, doc_id: T.untyped, password: T.untyped).returns(T.untyped) }
|
1419
|
+
def self.build(encrypt, doc_id, password); end
|
1266
1420
|
|
1267
|
-
sig { returns(T.untyped) }
|
1268
|
-
|
1421
|
+
sig { params(encrypt: T.untyped, doc_id: T.untyped, password: T.untyped).returns(T.untyped) }
|
1422
|
+
def self.build_standard_handler(encrypt, doc_id, password); end
|
1269
1423
|
|
1270
|
-
sig { returns(T.untyped) }
|
1271
|
-
|
1424
|
+
sig { params(encrypt: T.untyped, doc_id: T.untyped, password: T.untyped).returns(T.untyped) }
|
1425
|
+
def self.build_v5_handler(encrypt, doc_id, password); end
|
1272
1426
|
|
1273
|
-
sig { params(
|
1274
|
-
def
|
1427
|
+
sig { params(encrypt: T.untyped).returns(T.untyped) }
|
1428
|
+
def self.standard?(encrypt); end
|
1275
1429
|
|
1276
1430
|
sig { params(encrypt: T.untyped).returns(T.untyped) }
|
1277
|
-
def self.
|
1431
|
+
def self.standard_v5?(encrypt); end
|
1432
|
+
end
|
1278
1433
|
|
1279
|
-
|
1280
|
-
|
1434
|
+
class StandardKeyBuilder
|
1435
|
+
PassPadBytes = [ 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41,
|
1436
|
+
0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08,
|
1437
|
+
0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80,
|
1438
|
+
0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a ]
|
1281
1439
|
|
1282
|
-
sig { params(
|
1283
|
-
def
|
1440
|
+
sig { params(opts: T::Hash[Symbol, T.untyped]).void }
|
1441
|
+
def initialize(opts = {}); end
|
1284
1442
|
|
1285
|
-
sig { params(
|
1286
|
-
def
|
1443
|
+
sig { params(pass: String).returns(String) }
|
1444
|
+
def key(pass); end
|
1287
1445
|
|
1288
1446
|
sig { params(p: T.untyped).returns(T.untyped) }
|
1289
1447
|
def pad_pass(p = ""); end
|
@@ -1299,48 +1457,23 @@ module PDF
|
|
1299
1457
|
|
1300
1458
|
sig { params(user_pass: T.untyped).returns(T.untyped) }
|
1301
1459
|
def make_file_key(user_pass); end
|
1302
|
-
|
1303
|
-
sig { params(pass: T.untyped).returns(T.untyped) }
|
1304
|
-
def build_standard_key(pass); end
|
1305
|
-
end
|
1306
|
-
|
1307
|
-
class StandardSecurityHandlerV5
|
1308
|
-
sig { returns(T.untyped) }
|
1309
|
-
attr_reader :key_length
|
1310
|
-
|
1311
|
-
sig { returns(T.untyped) }
|
1312
|
-
attr_reader :encrypt_key
|
1313
|
-
|
1314
|
-
sig { params(opts: T.untyped).void }
|
1315
|
-
def initialize(opts = {}); end
|
1316
|
-
|
1317
|
-
sig { params(encrypt: T.untyped).returns(T.untyped) }
|
1318
|
-
def self.supports?(encrypt); end
|
1319
|
-
|
1320
|
-
sig { params(buf: T.untyped, ref: T.untyped).returns(T.untyped) }
|
1321
|
-
def decrypt(buf, ref); end
|
1322
|
-
|
1323
|
-
sig { params(password: T.untyped).returns(T.untyped) }
|
1324
|
-
def auth_owner_pass(password); end
|
1325
|
-
|
1326
|
-
sig { params(password: T.untyped).returns(T.untyped) }
|
1327
|
-
def auth_user_pass(password); end
|
1328
|
-
|
1329
|
-
sig { params(pass: T.untyped).returns(T.untyped) }
|
1330
|
-
def build_standard_key(pass); end
|
1331
1460
|
end
|
1332
1461
|
|
1333
1462
|
class Stream
|
1334
|
-
sig { returns(T.untyped) }
|
1463
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
1335
1464
|
attr_accessor :hash
|
1336
1465
|
|
1337
|
-
sig { returns(
|
1466
|
+
sig { returns(String) }
|
1338
1467
|
attr_accessor :data
|
1339
1468
|
|
1340
|
-
sig { params(hash: T.untyped, data:
|
1341
|
-
def initialize(hash, data)
|
1469
|
+
sig { params(hash: T::Hash[Symbol, T.untyped], data: String).void }
|
1470
|
+
def initialize(hash, data)
|
1471
|
+
@hash = T.let(T.unsafe(nil), T::Hash[Symbol, T.untyped])
|
1472
|
+
@data = T.let(T.unsafe(nil), String)
|
1473
|
+
@udata = T.let(T.unsafe(nil), T.nilable(String))
|
1474
|
+
end
|
1342
1475
|
|
1343
|
-
sig { returns(
|
1476
|
+
sig { returns(String) }
|
1344
1477
|
def unfiltered_data; end
|
1345
1478
|
end
|
1346
1479
|
|
@@ -1357,7 +1490,6 @@ module PDF
|
|
1357
1490
|
|
1358
1491
|
class TextRun
|
1359
1492
|
include Comparable
|
1360
|
-
extend T::Sig
|
1361
1493
|
|
1362
1494
|
sig { returns(T.untyped) }
|
1363
1495
|
attr_reader :x
|
@@ -1540,6 +1672,109 @@ module PDF
|
|
1540
1672
|
def faster_multiply!(a2, b2, c2, d2, e2, f2); end
|
1541
1673
|
end
|
1542
1674
|
|
1675
|
+
class TypeCheck
|
1676
|
+
|
1677
|
+
sig { params(obj: T.untyped).returns(Numeric) }
|
1678
|
+
def self.cast_to_numeric!(obj); end
|
1679
|
+
|
1680
|
+
sig { params(string: T.untyped).returns(String) }
|
1681
|
+
def self.cast_to_string!(string); end
|
1682
|
+
|
1683
|
+
sig { params(obj: T.untyped).returns(T.nilable(Symbol)) }
|
1684
|
+
def self.cast_to_symbol(obj); end
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
class ValidatingReceiver
|
1688
|
+
sig { params(wrapped: T.untyped).void }
|
1689
|
+
def initialize(wrapped)
|
1690
|
+
@wrapped = T.let(T.unsafe(nil), T.untyped)
|
1691
|
+
end
|
1692
|
+
|
1693
|
+
sig { params(page: PDF::Reader::Page).void }
|
1694
|
+
def page=(page); end
|
1695
|
+
|
1696
|
+
sig { params(args: T.untyped).void }
|
1697
|
+
def save_graphics_state(*args); end
|
1698
|
+
|
1699
|
+
sig { params(args: T.untyped).void }
|
1700
|
+
def restore_graphics_state(*args); end
|
1701
|
+
|
1702
|
+
sig { params(args: T.untyped).void }
|
1703
|
+
def concatenate_matrix(*args); end
|
1704
|
+
|
1705
|
+
sig { params(args: T.untyped).void }
|
1706
|
+
def begin_text_object(*args); end
|
1707
|
+
|
1708
|
+
sig { params(args: T.untyped).void }
|
1709
|
+
def end_text_object(*args); end
|
1710
|
+
|
1711
|
+
sig { params(args: T.untyped).void }
|
1712
|
+
def set_character_spacing(*args); end
|
1713
|
+
|
1714
|
+
sig { params(args: T.untyped).void }
|
1715
|
+
def set_horizontal_text_scaling(*args); end
|
1716
|
+
|
1717
|
+
sig { params(args: T.untyped).void }
|
1718
|
+
def set_text_font_and_size(*args); end
|
1719
|
+
|
1720
|
+
sig { params(args: T.untyped).void }
|
1721
|
+
def set_text_leading(*args); end
|
1722
|
+
|
1723
|
+
sig { params(args: T.untyped).void }
|
1724
|
+
def set_text_rendering_mode(*args); end
|
1725
|
+
|
1726
|
+
sig { params(args: T.untyped).void }
|
1727
|
+
def set_text_rise(*args); end
|
1728
|
+
|
1729
|
+
sig { params(args: T.untyped).void }
|
1730
|
+
def set_word_spacing(*args); end
|
1731
|
+
|
1732
|
+
sig { params(args: T.untyped).void }
|
1733
|
+
def move_text_position(*args); end
|
1734
|
+
|
1735
|
+
sig { params(args: T.untyped).void }
|
1736
|
+
def move_text_position_and_set_leading(*args); end
|
1737
|
+
|
1738
|
+
sig { params(args: T.untyped).void }
|
1739
|
+
def set_text_matrix_and_text_line_matrix(*args); end
|
1740
|
+
|
1741
|
+
sig { params(args: T.untyped).void }
|
1742
|
+
def move_to_start_of_next_line(*args); end
|
1743
|
+
|
1744
|
+
sig { params(args: T.untyped).void }
|
1745
|
+
def show_text(*args); end
|
1746
|
+
|
1747
|
+
sig { params(args: T.untyped).void }
|
1748
|
+
def show_text_with_positioning(*args); end
|
1749
|
+
|
1750
|
+
sig { params(args: T.untyped).void }
|
1751
|
+
def move_to_next_line_and_show_text(*args); end
|
1752
|
+
|
1753
|
+
sig { params(args: T.untyped).void }
|
1754
|
+
def set_spacing_next_line_show_text(*args); end
|
1755
|
+
|
1756
|
+
sig { params(args: T.untyped).void }
|
1757
|
+
def invoke_xobject(*args); end
|
1758
|
+
|
1759
|
+
sig { params(args: T.untyped).void }
|
1760
|
+
def begin_inline_image(*args); end
|
1761
|
+
|
1762
|
+
sig { params(args: T.untyped).void }
|
1763
|
+
def begin_inline_image_data(*args); end
|
1764
|
+
|
1765
|
+
sig { params(args: T.untyped).void }
|
1766
|
+
def end_inline_image(*args); end
|
1767
|
+
|
1768
|
+
sig { params(meth: T.untyped).returns(T::Boolean) }
|
1769
|
+
def respond_to?(meth); end
|
1770
|
+
|
1771
|
+
sig { params(methodname: Symbol, args: T.untyped).void }
|
1772
|
+
def method_missing(methodname, *args); end
|
1773
|
+
|
1774
|
+
sig { params(methodname: T.untyped, args: T.untyped).void }
|
1775
|
+
def call_wrapped(methodname, *args); end
|
1776
|
+
end
|
1777
|
+
|
1543
1778
|
class UnimplementedSecurityHandler
|
1544
1779
|
sig { params(encrypt: T.untyped).returns(T.untyped) }
|
1545
1780
|
def self.supports?(encrypt); end
|
@@ -1589,40 +1824,36 @@ module PDF
|
|
1589
1824
|
end
|
1590
1825
|
|
1591
1826
|
class ZeroWidthRunsFilter
|
1592
|
-
extend T::Sig
|
1593
|
-
|
1594
1827
|
sig { params(runs: T::Array[PDF::Reader::TextRun]).returns(T::Array[PDF::Reader::TextRun]) }
|
1595
1828
|
def self.exclude_zero_width_runs(runs); end
|
1596
1829
|
end
|
1597
1830
|
|
1598
1831
|
module Filter
|
1599
|
-
sig { params(name:
|
1832
|
+
sig { params(name: Symbol, options: T::Hash[T.untyped, T.untyped]).returns(T.untyped) }
|
1600
1833
|
def self.with(name, options = {}); end
|
1601
1834
|
|
1602
1835
|
class Ascii85
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1836
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1837
|
+
def initialize(options = {})
|
1838
|
+
@options = T.let(T.unsafe(nil), T::Hash[T.untyped, T.untyped])
|
1839
|
+
end
|
1607
1840
|
|
1608
1841
|
sig { params(data: String).returns(String) }
|
1609
1842
|
def filter(data); end
|
1610
1843
|
end
|
1611
1844
|
|
1612
1845
|
class AsciiHex
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1846
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1847
|
+
def initialize(options = {})
|
1848
|
+
@options = T.let(T.unsafe(nil), T::Hash[T.untyped, T.untyped])
|
1849
|
+
end
|
1617
1850
|
|
1618
1851
|
sig { params(data: String).returns(String) }
|
1619
1852
|
def filter(data); end
|
1620
1853
|
end
|
1621
1854
|
|
1622
1855
|
class Depredict
|
1623
|
-
|
1624
|
-
|
1625
|
-
sig { params(options: T.untyped).void }
|
1856
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1626
1857
|
def initialize(options = {}); end
|
1627
1858
|
|
1628
1859
|
sig { params(data: String).returns(String) }
|
@@ -1636,12 +1867,13 @@ module PDF
|
|
1636
1867
|
end
|
1637
1868
|
|
1638
1869
|
class Flate
|
1639
|
-
extend T::Sig
|
1640
1870
|
ZLIB_AUTO_DETECT_ZLIB_OR_GZIP = 47
|
1641
1871
|
ZLIB_RAW_DEFLATE = -15
|
1642
1872
|
|
1643
|
-
sig { params(options: T.untyped).void }
|
1644
|
-
def initialize(options = {})
|
1873
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1874
|
+
def initialize(options = {})
|
1875
|
+
@options = T.let(T.unsafe(nil), T::Hash[T.untyped, T.untyped])
|
1876
|
+
end
|
1645
1877
|
|
1646
1878
|
sig { params(data: String).returns(String) }
|
1647
1879
|
def filter(data); end
|
@@ -1651,28 +1883,30 @@ module PDF
|
|
1651
1883
|
end
|
1652
1884
|
|
1653
1885
|
class Lzw
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1886
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1887
|
+
def initialize(options = {})
|
1888
|
+
@options = T.let(T.unsafe(nil), T::Hash[T.untyped, T.untyped])
|
1889
|
+
end
|
1658
1890
|
|
1659
1891
|
sig { params(data: String).returns(String) }
|
1660
1892
|
def filter(data); end
|
1661
1893
|
end
|
1662
1894
|
|
1663
1895
|
class Null
|
1664
|
-
sig { params(options: T.untyped).void }
|
1665
|
-
def initialize(options = {})
|
1896
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1897
|
+
def initialize(options = {})
|
1898
|
+
@options = T.let(T.unsafe(nil), T::Hash[T.untyped, T.untyped])
|
1899
|
+
end
|
1666
1900
|
|
1667
1901
|
sig { params(data: T.untyped).returns(T.untyped) }
|
1668
1902
|
def filter(data); end
|
1669
1903
|
end
|
1670
1904
|
|
1671
1905
|
class RunLength
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1906
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
1907
|
+
def initialize(options = {})
|
1908
|
+
@options = T.let(T.unsafe(nil), T::Hash[T.untyped, T.untyped])
|
1909
|
+
end
|
1676
1910
|
|
1677
1911
|
sig { params(data: String).returns(String) }
|
1678
1912
|
def filter(data); end
|