checkoff 0.201.0 → 0.203.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +130 -28
  3. data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
  4. data/.overcommit.yml +27 -2
  5. data/.rubocop.yml +20 -2
  6. data/.rubocop_todo.yml +90 -0
  7. data/.solargraph.yml +10 -1
  8. data/DEVELOPMENT.md +1 -1
  9. data/Gemfile +11 -8
  10. data/Gemfile.lock +66 -42
  11. data/LICENSE +1 -1
  12. data/Makefile +14 -12
  13. data/bin/brakeman +27 -0
  14. data/bin/overcommit_branch +117 -0
  15. data/bin/spoom +27 -0
  16. data/bin/srb +27 -0
  17. data/bin/srb-rbi +27 -0
  18. data/bin/tapioca +27 -0
  19. data/config/annotations_misc.rb +35 -0
  20. data/docs/cookiecutter_input.json +1 -0
  21. data/fix.sh +14 -6
  22. data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
  23. data/lib/checkoff/version.rb +1 -1
  24. data/requirements_dev.txt +1 -1
  25. data/sorbet/config +4 -0
  26. data/sorbet/rbi/annotations/.gitattributes +1 -0
  27. data/sorbet/rbi/annotations/activesupport.rbi +453 -0
  28. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  29. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  30. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  31. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  32. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  33. data/sorbet/rbi/dsl/.gitattributes +1 -0
  34. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  35. data/sorbet/rbi/gems/.gitattributes +1 -0
  36. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
  37. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
  38. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  39. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
  40. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  41. data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
  42. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  43. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  44. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
  45. data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
  46. data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
  47. data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
  48. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
  49. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
  50. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
  51. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
  52. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
  53. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  54. data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
  55. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
  56. data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
  57. data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
  58. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
  59. data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
  60. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
  61. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
  62. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
  63. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
  64. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
  65. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
  66. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
  67. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
  68. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
  69. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
  70. data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
  71. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
  72. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
  73. data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
  74. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
  75. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
  76. data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
  77. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
  78. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
  79. data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
  80. data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
  81. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
  82. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
  83. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  84. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  85. data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
  86. data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
  87. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
  88. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
  89. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
  90. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
  91. data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
  92. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
  93. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
  94. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
  95. data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
  96. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
  97. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
  98. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
  99. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
  100. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  101. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  102. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
  103. data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
  104. data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
  105. data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
  106. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
  107. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  108. data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
  109. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
  110. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
  111. data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
  112. data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
  113. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  114. data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
  115. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  116. data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
  117. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
  118. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
  119. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
  120. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
  121. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
  122. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
  123. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  124. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
  125. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  126. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  127. data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
  128. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
  129. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
  130. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  131. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  132. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
  133. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
  134. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  135. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
  136. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  137. data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
  138. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
  139. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  140. data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
  141. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  142. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
  143. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  144. data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
  145. data/sorbet/rbi/todo.rbi +11 -0
  146. data/sorbet/tapioca/config.yml +13 -0
  147. data/sorbet/tapioca/require.rb +4 -0
  148. metadata +134 -3
@@ -0,0 +1,936 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `public_suffix` gem.
5
+ # Please instead update this file by running `bin/tapioca gem public_suffix`.
6
+
7
+
8
+ # PublicSuffix is a Ruby domain name parser based on the Public Suffix List.
9
+ #
10
+ # The [Public Suffix List](https://publicsuffix.org) is a cross-vendor initiative
11
+ # to provide an accurate list of domain name suffixes.
12
+ #
13
+ # The Public Suffix List is an initiative of the Mozilla Project,
14
+ # but is maintained as a community resource. It is available for use in any software,
15
+ # but was originally created to meet the needs of browser manufacturers.
16
+ #
17
+ # source://public_suffix//lib/public_suffix/domain.rb#9
18
+ module PublicSuffix
19
+ class << self
20
+ # private
21
+ #
22
+ # source://public_suffix//lib/public_suffix.rb#149
23
+ def decompose(name, rule); end
24
+
25
+ # Attempt to parse the name and returns the domain, if valid.
26
+ #
27
+ # This method doesn't raise. Instead, it returns nil if the domain is not valid for whatever reason.
28
+ #
29
+ # @param name [#to_s] The domain name or fully qualified domain name to parse.
30
+ # @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List}
31
+ # @param ignore_private [Boolean]
32
+ # @return [String]
33
+ #
34
+ # source://public_suffix//lib/public_suffix.rb#140
35
+ def domain(name, **options); end
36
+
37
+ # Pretend we know how to deal with user input.
38
+ #
39
+ # source://public_suffix//lib/public_suffix.rb#164
40
+ def normalize(name); end
41
+
42
+ # Parses +name+ and returns the {PublicSuffix::Domain} instance.
43
+ #
44
+ # @example Parse a valid domain
45
+ # PublicSuffix.parse("google.com")
46
+ # # => #<PublicSuffix::Domain:0x007fec2e51e588 @sld="google", @tld="com", @trd=nil>
47
+ # @example Parse a valid subdomain
48
+ # PublicSuffix.parse("www.google.com")
49
+ # # => #<PublicSuffix::Domain:0x007fec276d4cf8 @sld="google", @tld="com", @trd="www">
50
+ # @example Parse a fully qualified domain
51
+ # PublicSuffix.parse("google.com.")
52
+ # # => #<PublicSuffix::Domain:0x007fec257caf38 @sld="google", @tld="com", @trd=nil>
53
+ # @example Parse a fully qualified domain (subdomain)
54
+ # PublicSuffix.parse("www.google.com.")
55
+ # # => #<PublicSuffix::Domain:0x007fec27b6bca8 @sld="google", @tld="com", @trd="www">
56
+ # @example Parse an invalid (unlisted) domain
57
+ # PublicSuffix.parse("x.yz")
58
+ # # => #<PublicSuffix::Domain:0x007fec2f49bec0 @sld="x", @tld="yz", @trd=nil>
59
+ # @example Parse an invalid (unlisted) domain with strict checking (without applying the default * rule)
60
+ # PublicSuffix.parse("x.yz", default_rule: nil)
61
+ # # => PublicSuffix::DomainInvalid: `x.yz` is not a valid domain
62
+ # @example Parse an URL (not supported, only domains)
63
+ # PublicSuffix.parse("http://www.google.com")
64
+ # # => PublicSuffix::DomainInvalid: http://www.google.com is not expected to contain a scheme
65
+ # @param name [#to_s] The domain name or fully qualified domain name to parse.
66
+ # @param list [PublicSuffix::List] The rule list to search, defaults to the default {PublicSuffix::List}
67
+ # @param ignore_private [Boolean]
68
+ # @raise [PublicSuffix::DomainInvalid] If domain is not a valid domain.
69
+ # @raise [PublicSuffix::DomainNotAllowed] If a rule for +domain+ is found, but the rule doesn't allow +domain+.
70
+ # @return [PublicSuffix::Domain]
71
+ #
72
+ # source://public_suffix//lib/public_suffix.rb#67
73
+ def parse(name, list: T.unsafe(nil), default_rule: T.unsafe(nil), ignore_private: T.unsafe(nil)); end
74
+
75
+ # Checks whether +domain+ is assigned and allowed, without actually parsing it.
76
+ #
77
+ # This method doesn't care whether domain is a domain or subdomain.
78
+ # The validation is performed using the default {PublicSuffix::List}.
79
+ #
80
+ # @example Validate a valid domain
81
+ # PublicSuffix.valid?("example.com")
82
+ # # => true
83
+ # @example Validate a valid subdomain
84
+ # PublicSuffix.valid?("www.example.com")
85
+ # # => true
86
+ # @example Validate a not-listed domain
87
+ # PublicSuffix.valid?("example.tldnotlisted")
88
+ # # => true
89
+ # @example Validate a not-listed domain with strict checking (without applying the default * rule)
90
+ # PublicSuffix.valid?("example.tldnotlisted")
91
+ # # => true
92
+ # PublicSuffix.valid?("example.tldnotlisted", default_rule: nil)
93
+ # # => false
94
+ # @example Validate a fully qualified domain
95
+ # PublicSuffix.valid?("google.com.")
96
+ # # => true
97
+ # PublicSuffix.valid?("www.google.com.")
98
+ # # => true
99
+ # @example Check an URL (which is not a valid domain)
100
+ # PublicSuffix.valid?("http://www.example.com")
101
+ # # => false
102
+ # @param name [#to_s] The domain name or fully qualified domain name to validate.
103
+ # @param ignore_private [Boolean]
104
+ # @return [Boolean]
105
+ #
106
+ # source://public_suffix//lib/public_suffix.rb#123
107
+ def valid?(name, list: T.unsafe(nil), default_rule: T.unsafe(nil), ignore_private: T.unsafe(nil)); end
108
+ end
109
+ end
110
+
111
+ # source://public_suffix//lib/public_suffix.rb#26
112
+ PublicSuffix::BANG = T.let(T.unsafe(nil), String)
113
+
114
+ # source://public_suffix//lib/public_suffix.rb#25
115
+ PublicSuffix::DOT = T.let(T.unsafe(nil), String)
116
+
117
+ # Domain represents a domain name, composed by a TLD, SLD and TRD.
118
+ #
119
+ # source://public_suffix//lib/public_suffix/domain.rb#12
120
+ class PublicSuffix::Domain
121
+ # Creates and returns a new {PublicSuffix::Domain} instance.
122
+ #
123
+ # @example Initialize with a TLD and SLD
124
+ # PublicSuffix::Domain.new("com", "example")
125
+ # # => #<PublicSuffix::Domain @tld="com", @trd=nil>
126
+ # @example Initialize with a TLD
127
+ # PublicSuffix::Domain.new("com")
128
+ # # => #<PublicSuffix::Domain @tld="com">
129
+ # @example Initialize with a TLD, SLD and TRD
130
+ # PublicSuffix::Domain.new("com", "example", "wwww")
131
+ # # => #<PublicSuffix::Domain @tld="com", @trd=nil, @sld="example">
132
+ # @overload initialize
133
+ # @overload initialize
134
+ # @overload initialize
135
+ # @return [Domain] a new instance of Domain
136
+ # @yield [self] Yields on self.
137
+ # @yieldparam self [PublicSuffix::Domain] The newly creates instance
138
+ #
139
+ # source://public_suffix//lib/public_suffix/domain.rb#65
140
+ def initialize(*args); end
141
+
142
+ # Returns a domain-like representation of this object
143
+ # if the object is a {#domain?}, <tt>nil</tt> otherwise.
144
+ #
145
+ # PublicSuffix::Domain.new("com").domain
146
+ # # => nil
147
+ #
148
+ # PublicSuffix::Domain.new("com", "google").domain
149
+ # # => "google.com"
150
+ #
151
+ # PublicSuffix::Domain.new("com", "google", "www").domain
152
+ # # => "www.google.com"
153
+ #
154
+ # This method doesn't validate the input. It handles the domain
155
+ # as a valid domain name and simply applies the necessary transformations.
156
+ #
157
+ # This method returns a FQD, not just the domain part.
158
+ # To get the domain part, use <tt>#sld</tt> (aka second level domain).
159
+ #
160
+ # PublicSuffix::Domain.new("com", "google", "www").domain
161
+ # # => "google.com"
162
+ #
163
+ # PublicSuffix::Domain.new("com", "google", "www").sld
164
+ # # => "google"
165
+ #
166
+ # @return [String]
167
+ # @see #domain?
168
+ # @see #subdomain
169
+ #
170
+ # source://public_suffix//lib/public_suffix/domain.rb#137
171
+ def domain; end
172
+
173
+ # Checks whether <tt>self</tt> looks like a domain.
174
+ #
175
+ # This method doesn't actually validate the domain.
176
+ # It only checks whether the instance contains
177
+ # a value for the {#tld} and {#sld} attributes.
178
+ #
179
+ # @example
180
+ #
181
+ # PublicSuffix::Domain.new("com").domain?
182
+ # # => false
183
+ #
184
+ # PublicSuffix::Domain.new("com", "google").domain?
185
+ # # => true
186
+ #
187
+ # PublicSuffix::Domain.new("com", "google", "www").domain?
188
+ # # => true
189
+ #
190
+ # # This is an invalid domain, but returns true
191
+ # # because this method doesn't validate the content.
192
+ # PublicSuffix::Domain.new("com", nil).domain?
193
+ # # => true
194
+ # @return [Boolean]
195
+ # @see #subdomain?
196
+ #
197
+ # source://public_suffix//lib/public_suffix/domain.rb#198
198
+ def domain?; end
199
+
200
+ # Returns the full domain name.
201
+ #
202
+ # @example Gets the domain name of a domain
203
+ # PublicSuffix::Domain.new("com", "google").name
204
+ # # => "google.com"
205
+ # @example Gets the domain name of a subdomain
206
+ # PublicSuffix::Domain.new("com", "google", "www").name
207
+ # # => "www.google.com"
208
+ # @return [String]
209
+ #
210
+ # source://public_suffix//lib/public_suffix/domain.rb#105
211
+ def name; end
212
+
213
+ # Returns the value of attribute sld.
214
+ #
215
+ # source://public_suffix//lib/public_suffix/domain.rb#33
216
+ def sld; end
217
+
218
+ # Returns a subdomain-like representation of this object
219
+ # if the object is a {#subdomain?}, <tt>nil</tt> otherwise.
220
+ #
221
+ # PublicSuffix::Domain.new("com").subdomain
222
+ # # => nil
223
+ #
224
+ # PublicSuffix::Domain.new("com", "google").subdomain
225
+ # # => nil
226
+ #
227
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain
228
+ # # => "www.google.com"
229
+ #
230
+ # This method doesn't validate the input. It handles the domain
231
+ # as a valid domain name and simply applies the necessary transformations.
232
+ #
233
+ # This method returns a FQD, not just the subdomain part.
234
+ # To get the subdomain part, use <tt>#trd</tt> (aka third level domain).
235
+ #
236
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain
237
+ # # => "www.google.com"
238
+ #
239
+ # PublicSuffix::Domain.new("com", "google", "www").trd
240
+ # # => "www"
241
+ #
242
+ # @return [String]
243
+ # @see #subdomain?
244
+ # @see #domain
245
+ #
246
+ # source://public_suffix//lib/public_suffix/domain.rb#169
247
+ def subdomain; end
248
+
249
+ # Checks whether <tt>self</tt> looks like a subdomain.
250
+ #
251
+ # This method doesn't actually validate the subdomain.
252
+ # It only checks whether the instance contains
253
+ # a value for the {#tld}, {#sld} and {#trd} attributes.
254
+ # If you also want to validate the domain,
255
+ # use {#valid_subdomain?} instead.
256
+ #
257
+ # @example
258
+ #
259
+ # PublicSuffix::Domain.new("com").subdomain?
260
+ # # => false
261
+ #
262
+ # PublicSuffix::Domain.new("com", "google").subdomain?
263
+ # # => false
264
+ #
265
+ # PublicSuffix::Domain.new("com", "google", "www").subdomain?
266
+ # # => true
267
+ #
268
+ # # This is an invalid domain, but returns true
269
+ # # because this method doesn't validate the content.
270
+ # PublicSuffix::Domain.new("com", "example", nil).subdomain?
271
+ # # => true
272
+ # @return [Boolean]
273
+ # @see #domain?
274
+ #
275
+ # source://public_suffix//lib/public_suffix/domain.rb#229
276
+ def subdomain?; end
277
+
278
+ # Returns the value of attribute tld.
279
+ #
280
+ # source://public_suffix//lib/public_suffix/domain.rb#33
281
+ def tld; end
282
+
283
+ # Returns an array containing the domain parts.
284
+ #
285
+ # @example
286
+ #
287
+ # PublicSuffix::Domain.new("google.com").to_a
288
+ # # => [nil, "google", "com"]
289
+ #
290
+ # PublicSuffix::Domain.new("www.google.com").to_a
291
+ # # => [nil, "google", "com"]
292
+ # @return [Array<String, nil>]
293
+ #
294
+ # source://public_suffix//lib/public_suffix/domain.rb#89
295
+ def to_a; end
296
+
297
+ # Returns a string representation of this object.
298
+ #
299
+ # @return [String]
300
+ #
301
+ # source://public_suffix//lib/public_suffix/domain.rb#73
302
+ def to_s; end
303
+
304
+ # Returns the value of attribute trd.
305
+ #
306
+ # source://public_suffix//lib/public_suffix/domain.rb#33
307
+ def trd; end
308
+
309
+ class << self
310
+ # Splits a string into the labels, that is the dot-separated parts.
311
+ #
312
+ # The input is not validated, but it is assumed to be a valid domain name.
313
+ #
314
+ # @example
315
+ #
316
+ # name_to_labels('example.com')
317
+ # # => ['example', 'com']
318
+ #
319
+ # name_to_labels('example.co.uk')
320
+ # # => ['example', 'co', 'uk']
321
+ # @param name [String, #to_s] The domain name to split.
322
+ # @return [Array<String>]
323
+ #
324
+ # source://public_suffix//lib/public_suffix/domain.rb#28
325
+ def name_to_labels(name); end
326
+ end
327
+ end
328
+
329
+ # Raised when trying to parse an invalid name.
330
+ # A name is considered invalid when no rule is found in the definition list.
331
+ #
332
+ # @example
333
+ #
334
+ # PublicSuffix.parse("nic.test")
335
+ # # => PublicSuffix::DomainInvalid
336
+ #
337
+ # PublicSuffix.parse("http://www.nic.it")
338
+ # # => PublicSuffix::DomainInvalid
339
+ #
340
+ # source://public_suffix//lib/public_suffix/errors.rb#25
341
+ class PublicSuffix::DomainInvalid < ::PublicSuffix::Error; end
342
+
343
+ # Raised when trying to parse a name that matches a suffix.
344
+ #
345
+ # @example
346
+ #
347
+ # PublicSuffix.parse("nic.do")
348
+ # # => PublicSuffix::DomainNotAllowed
349
+ #
350
+ # PublicSuffix.parse("www.nic.do")
351
+ # # => PublicSuffix::Domain
352
+ #
353
+ # source://public_suffix//lib/public_suffix/errors.rb#38
354
+ class PublicSuffix::DomainNotAllowed < ::PublicSuffix::DomainInvalid; end
355
+
356
+ # source://public_suffix//lib/public_suffix/errors.rb#11
357
+ class PublicSuffix::Error < ::StandardError; end
358
+
359
+ # A {PublicSuffix::List} is a collection of one
360
+ # or more {PublicSuffix::Rule}.
361
+ #
362
+ # Given a {PublicSuffix::List},
363
+ # you can add or remove {PublicSuffix::Rule},
364
+ # iterate all items in the list or search for the first rule
365
+ # which matches a specific domain name.
366
+ #
367
+ # # Create a new list
368
+ # list = PublicSuffix::List.new
369
+ #
370
+ # # Push two rules to the list
371
+ # list << PublicSuffix::Rule.factory("it")
372
+ # list << PublicSuffix::Rule.factory("com")
373
+ #
374
+ # # Get the size of the list
375
+ # list.size
376
+ # # => 2
377
+ #
378
+ # # Search for the rule matching given domain
379
+ # list.find("example.com")
380
+ # # => #<PublicSuffix::Rule::Normal>
381
+ # list.find("example.org")
382
+ # # => nil
383
+ #
384
+ # You can create as many {PublicSuffix::List} you want.
385
+ # The {PublicSuffix::List.default} rule list is used
386
+ # to tokenize and validate a domain.
387
+ #
388
+ # source://public_suffix//lib/public_suffix/list.rb#40
389
+ class PublicSuffix::List
390
+ # Initializes an empty {PublicSuffix::List}.
391
+ #
392
+ # @return [List] a new instance of List
393
+ # @yield [self] Yields on self.
394
+ # @yieldparam self [PublicSuffix::List] The newly created instance.
395
+ #
396
+ # source://public_suffix//lib/public_suffix/list.rb#106
397
+ def initialize; end
398
+
399
+ # Adds the given object to the list and optionally refreshes the rule index.
400
+ #
401
+ # @param rule [PublicSuffix::Rule::*] the rule to add to the list
402
+ # @return [self]
403
+ #
404
+ # source://public_suffix//lib/public_suffix/list.rb#141
405
+ def <<(rule); end
406
+
407
+ # Checks whether two lists are equal.
408
+ #
409
+ # List <tt>one</tt> is equal to <tt>two</tt>, if <tt>two</tt> is an instance of
410
+ # {PublicSuffix::List} and each +PublicSuffix::Rule::*+
411
+ # in list <tt>one</tt> is available in list <tt>two</tt>, in the same order.
412
+ #
413
+ # @param other [PublicSuffix::List] the List to compare
414
+ # @return [Boolean]
415
+ #
416
+ # source://public_suffix//lib/public_suffix/list.rb#120
417
+ def ==(other); end
418
+
419
+ # Adds the given object to the list and optionally refreshes the rule index.
420
+ #
421
+ # @param rule [PublicSuffix::Rule::*] the rule to add to the list
422
+ # @return [self]
423
+ #
424
+ # source://public_suffix//lib/public_suffix/list.rb#141
425
+ def add(rule); end
426
+
427
+ # Removes all rules.
428
+ #
429
+ # @return [self]
430
+ #
431
+ # source://public_suffix//lib/public_suffix/list.rb#164
432
+ def clear; end
433
+
434
+ # Gets the default rule.
435
+ #
436
+ # @return [PublicSuffix::Rule::*]
437
+ # @see PublicSuffix::Rule.default_rule
438
+ #
439
+ # source://public_suffix//lib/public_suffix/list.rb#226
440
+ def default_rule; end
441
+
442
+ # Iterates each rule in the list.
443
+ #
444
+ # source://public_suffix//lib/public_suffix/list.rb#128
445
+ def each(&block); end
446
+
447
+ # Checks whether the list is empty.
448
+ #
449
+ # @return [Boolean]
450
+ #
451
+ # source://public_suffix//lib/public_suffix/list.rb#157
452
+ def empty?; end
453
+
454
+ # Checks whether two lists are equal.
455
+ #
456
+ # List <tt>one</tt> is equal to <tt>two</tt>, if <tt>two</tt> is an instance of
457
+ # {PublicSuffix::List} and each +PublicSuffix::Rule::*+
458
+ # in list <tt>one</tt> is available in list <tt>two</tt>, in the same order.
459
+ #
460
+ # @param other [PublicSuffix::List] the List to compare
461
+ # @return [Boolean]
462
+ #
463
+ # source://public_suffix//lib/public_suffix/list.rb#120
464
+ def eql?(other); end
465
+
466
+ # Finds and returns the rule corresponding to the longest public suffix for the hostname.
467
+ #
468
+ # @param name [#to_s] the hostname
469
+ # @param default [PublicSuffix::Rule::*] the default rule to return in case no rule matches
470
+ # @return [PublicSuffix::Rule::*]
471
+ #
472
+ # source://public_suffix//lib/public_suffix/list.rb#174
473
+ def find(name, default: T.unsafe(nil), **options); end
474
+
475
+ # Gets the number of rules in the list.
476
+ #
477
+ # @return [Integer]
478
+ #
479
+ # source://public_suffix//lib/public_suffix/list.rb#150
480
+ def size; end
481
+
482
+ protected
483
+
484
+ # Returns the value of attribute rules.
485
+ #
486
+ # source://public_suffix//lib/public_suffix/list.rb#233
487
+ def rules; end
488
+
489
+ private
490
+
491
+ # source://public_suffix//lib/public_suffix/list.rb#238
492
+ def entry_to_rule(entry, value); end
493
+
494
+ # source://public_suffix//lib/public_suffix/list.rb#242
495
+ def rule_to_entry(rule); end
496
+
497
+ # Selects all the rules matching given hostame.
498
+ #
499
+ # If `ignore_private` is set to true, the algorithm will skip the rules that are flagged as
500
+ # private domain. Note that the rules will still be part of the loop.
501
+ # If you frequently need to access lists ignoring the private domains,
502
+ # you should create a list that doesn't include these domains setting the
503
+ # `private_domains: false` option when calling {.parse}.
504
+ #
505
+ # Note that this method is currently private, as you should not rely on it. Instead,
506
+ # the public interface is {#find}. The current internal algorithm allows to return all
507
+ # matching rules, but different data structures may not be able to do it, and instead would
508
+ # return only the match. For this reason, you should rely on {#find}.
509
+ #
510
+ # @param name [#to_s] the hostname
511
+ # @param ignore_private [Boolean]
512
+ # @return [Array<PublicSuffix::Rule::*>]
513
+ #
514
+ # source://public_suffix//lib/public_suffix/list.rb#199
515
+ def select(name, ignore_private: T.unsafe(nil)); end
516
+
517
+ class << self
518
+ # Gets the default rule list.
519
+ #
520
+ # Initializes a new {PublicSuffix::List} parsing the content
521
+ # of {PublicSuffix::List.default_list_content}, if required.
522
+ #
523
+ # @return [PublicSuffix::List]
524
+ #
525
+ # source://public_suffix//lib/public_suffix/list.rb#50
526
+ def default(**options); end
527
+
528
+ # Sets the default rule list to +value+.
529
+ #
530
+ # @param value [PublicSuffix::List] the new list
531
+ # @return [PublicSuffix::List]
532
+ #
533
+ # source://public_suffix//lib/public_suffix/list.rb#58
534
+ def default=(value); end
535
+
536
+ # Parse given +input+ treating the content as Public Suffix List.
537
+ #
538
+ # See http://publicsuffix.org/format/ for more details about input format.
539
+ #
540
+ # @param input [#each_line] the list to parse
541
+ # @param private_domains [Boolean] whether to ignore the private domains section
542
+ # @return [PublicSuffix::List]
543
+ #
544
+ # source://public_suffix//lib/public_suffix/list.rb#69
545
+ def parse(input, private_domains: T.unsafe(nil)); end
546
+ end
547
+ end
548
+
549
+ # source://public_suffix//lib/public_suffix/list.rb#42
550
+ PublicSuffix::List::DEFAULT_LIST_PATH = T.let(T.unsafe(nil), String)
551
+
552
+ # A Rule is a special object which holds a single definition
553
+ # of the Public Suffix List.
554
+ #
555
+ # There are 3 types of rules, each one represented by a specific
556
+ # subclass within the +PublicSuffix::Rule+ namespace.
557
+ #
558
+ # To create a new Rule, use the {PublicSuffix::Rule#factory} method.
559
+ #
560
+ # PublicSuffix::Rule.factory("ar")
561
+ # # => #<PublicSuffix::Rule::Normal>
562
+ #
563
+ # source://public_suffix//lib/public_suffix/rule.rb#22
564
+ module PublicSuffix::Rule
565
+ class << self
566
+ # The default rule to use if no rule match.
567
+ #
568
+ # The default rule is "*". From https://publicsuffix.org/list/:
569
+ #
570
+ # > If no rules match, the prevailing rule is "*".
571
+ #
572
+ # @return [PublicSuffix::Rule::Wildcard] The default rule.
573
+ #
574
+ # source://public_suffix//lib/public_suffix/rule.rb#344
575
+ def default; end
576
+
577
+ # Takes the +name+ of the rule, detects the specific rule class
578
+ # and creates a new instance of that class.
579
+ # The +name+ becomes the rule +value+.
580
+ #
581
+ # @example Creates a Normal rule
582
+ # PublicSuffix::Rule.factory("ar")
583
+ # # => #<PublicSuffix::Rule::Normal>
584
+ # @example Creates a Wildcard rule
585
+ # PublicSuffix::Rule.factory("*.ar")
586
+ # # => #<PublicSuffix::Rule::Wildcard>
587
+ # @example Creates an Exception rule
588
+ # PublicSuffix::Rule.factory("!congresodelalengua3.ar")
589
+ # # => #<PublicSuffix::Rule::Exception>
590
+ # @param content [#to_s] the content of the rule
591
+ # @return [PublicSuffix::Rule::*] A rule instance.
592
+ #
593
+ # source://public_suffix//lib/public_suffix/rule.rb#326
594
+ def factory(content, private: T.unsafe(nil)); end
595
+ end
596
+ end
597
+
598
+ # = Abstract rule class
599
+ #
600
+ # This represent the base class for a Rule definition
601
+ # in the {Public Suffix List}[https://publicsuffix.org].
602
+ #
603
+ # This is intended to be an Abstract class
604
+ # and you shouldn't create a direct instance. The only purpose
605
+ # of this class is to expose a common interface
606
+ # for all the available subclasses.
607
+ #
608
+ # * {PublicSuffix::Rule::Normal}
609
+ # * {PublicSuffix::Rule::Exception}
610
+ # * {PublicSuffix::Rule::Wildcard}
611
+ #
612
+ # ## Properties
613
+ #
614
+ # A rule is composed by 4 properties:
615
+ #
616
+ # value - A normalized version of the rule name.
617
+ # The normalization process depends on rule tpe.
618
+ #
619
+ # Here's an example
620
+ #
621
+ # PublicSuffix::Rule.factory("*.google.com")
622
+ # #<PublicSuffix::Rule::Wildcard:0x1015c14b0
623
+ # @value="google.com"
624
+ # >
625
+ #
626
+ # ## Rule Creation
627
+ #
628
+ # The best way to create a new rule is passing the rule name
629
+ # to the <tt>PublicSuffix::Rule.factory</tt> method.
630
+ #
631
+ # PublicSuffix::Rule.factory("com")
632
+ # # => PublicSuffix::Rule::Normal
633
+ #
634
+ # PublicSuffix::Rule.factory("*.com")
635
+ # # => PublicSuffix::Rule::Wildcard
636
+ #
637
+ # This method will detect the rule type and create an instance
638
+ # from the proper rule class.
639
+ #
640
+ # ## Rule Usage
641
+ #
642
+ # A rule describes the composition of a domain name and explains how to tokenize
643
+ # the name into tld, sld and trd.
644
+ #
645
+ # To use a rule, you first need to be sure the name you want to tokenize
646
+ # can be handled by the current rule.
647
+ # You can use the <tt>#match?</tt> method.
648
+ #
649
+ # rule = PublicSuffix::Rule.factory("com")
650
+ #
651
+ # rule.match?("google.com")
652
+ # # => true
653
+ #
654
+ # rule.match?("google.com")
655
+ # # => false
656
+ #
657
+ # Rule order is significant. A name can match more than one rule.
658
+ # See the {Public Suffix Documentation}[http://publicsuffix.org/format/]
659
+ # to learn more about rule priority.
660
+ #
661
+ # When you have the right rule, you can use it to tokenize the domain name.
662
+ #
663
+ # rule = PublicSuffix::Rule.factory("com")
664
+ #
665
+ # rule.decompose("google.com")
666
+ # # => ["google", "com"]
667
+ #
668
+ # rule.decompose("www.google.com")
669
+ # # => ["www.google", "com"]
670
+ #
671
+ # @abstract
672
+ #
673
+ # source://public_suffix//lib/public_suffix/rule.rb#102
674
+ class PublicSuffix::Rule::Base
675
+ # Initializes a new rule.
676
+ #
677
+ # @param value [String]
678
+ # @param private [Boolean]
679
+ # @return [Base] a new instance of Base
680
+ #
681
+ # source://public_suffix//lib/public_suffix/rule.rb#126
682
+ def initialize(value:, length: T.unsafe(nil), private: T.unsafe(nil)); end
683
+
684
+ # Checks whether this rule is equal to <tt>other</tt>.
685
+ #
686
+ # @param other [PublicSuffix::Rule::*] The rule to compare
687
+ # @return [Boolean] true if this rule and other are instances of the same class
688
+ # and has the same value, false otherwise.
689
+ #
690
+ # source://public_suffix//lib/public_suffix/rule.rb#137
691
+ def ==(other); end
692
+
693
+ # @abstract
694
+ # @param domain [#to_s] The domain name to decompose
695
+ # @raise [NotImplementedError]
696
+ # @return [Array<String, nil>]
697
+ #
698
+ # source://public_suffix//lib/public_suffix/rule.rb#180
699
+ def decompose(*_arg0); end
700
+
701
+ # Checks whether this rule is equal to <tt>other</tt>.
702
+ #
703
+ # @param other [PublicSuffix::Rule::*] The rule to compare
704
+ # @return [Boolean] true if this rule and other are instances of the same class
705
+ # and has the same value, false otherwise.
706
+ #
707
+ # source://public_suffix//lib/public_suffix/rule.rb#137
708
+ def eql?(other); end
709
+
710
+ # @return [String] the length of the rule
711
+ #
712
+ # source://public_suffix//lib/public_suffix/rule.rb#108
713
+ def length; end
714
+
715
+ # Checks if this rule matches +name+.
716
+ #
717
+ # A domain name is said to match a rule if and only if
718
+ # all of the following conditions are met:
719
+ #
720
+ # - When the domain and rule are split into corresponding labels,
721
+ # that the domain contains as many or more labels than the rule.
722
+ # - Beginning with the right-most labels of both the domain and the rule,
723
+ # and continuing for all labels in the rule, one finds that for every pair,
724
+ # either they are identical, or that the label from the rule is "*".
725
+ #
726
+ # @example
727
+ # PublicSuffix::Rule.factory("com").match?("example.com")
728
+ # # => true
729
+ # PublicSuffix::Rule.factory("com").match?("example.net")
730
+ # # => false
731
+ # @param name [String] the domain name to check
732
+ # @return [Boolean]
733
+ # @see https://publicsuffix.org/list/
734
+ #
735
+ # source://public_suffix//lib/public_suffix/rule.rb#163
736
+ def match?(name); end
737
+
738
+ # @abstract
739
+ # @raise [NotImplementedError]
740
+ #
741
+ # source://public_suffix//lib/public_suffix/rule.rb#173
742
+ def parts; end
743
+
744
+ # @return [Boolean] true if the rule is a private domain
745
+ #
746
+ # source://public_suffix//lib/public_suffix/rule.rb#111
747
+ def private; end
748
+
749
+ # @return [String] the rule definition
750
+ #
751
+ # source://public_suffix//lib/public_suffix/rule.rb#105
752
+ def value; end
753
+
754
+ class << self
755
+ # Initializes a new rule from the content.
756
+ #
757
+ # @param content [String] the content of the rule
758
+ # @param private [Boolean]
759
+ #
760
+ # source://public_suffix//lib/public_suffix/rule.rb#118
761
+ def build(content, private: T.unsafe(nil)); end
762
+ end
763
+ end
764
+
765
+ # @api internal
766
+ #
767
+ # source://public_suffix//lib/public_suffix/rule.rb#25
768
+ class PublicSuffix::Rule::Entry < ::Struct
769
+ # Returns the value of attribute length
770
+ #
771
+ # @return [Object] the current value of length
772
+ def length; end
773
+
774
+ # Sets the attribute length
775
+ #
776
+ # @param value [Object] the value to set the attribute length to.
777
+ # @return [Object] the newly set value
778
+ def length=(_); end
779
+
780
+ # Returns the value of attribute private
781
+ #
782
+ # @return [Object] the current value of private
783
+ def private; end
784
+
785
+ # Sets the attribute private
786
+ #
787
+ # @param value [Object] the value to set the attribute private to.
788
+ # @return [Object] the newly set value
789
+ def private=(_); end
790
+
791
+ # Returns the value of attribute type
792
+ #
793
+ # @return [Object] the current value of type
794
+ def type; end
795
+
796
+ # Sets the attribute type
797
+ #
798
+ # @param value [Object] the value to set the attribute type to.
799
+ # @return [Object] the newly set value
800
+ def type=(_); end
801
+
802
+ class << self
803
+ def [](*_arg0); end
804
+ def inspect; end
805
+ def keyword_init?; end
806
+ def members; end
807
+ def new(*_arg0); end
808
+ end
809
+ end
810
+
811
+ # Exception represents an exception rule (e.g. !parliament.uk).
812
+ #
813
+ # source://public_suffix//lib/public_suffix/rule.rb#265
814
+ class PublicSuffix::Rule::Exception < ::PublicSuffix::Rule::Base
815
+ # Decomposes the domain name according to rule properties.
816
+ #
817
+ # @param domain [#to_s] The domain name to decompose
818
+ # @return [Array<String>] The array with [trd + sld, tld].
819
+ #
820
+ # source://public_suffix//lib/public_suffix/rule.rb#286
821
+ def decompose(domain); end
822
+
823
+ # dot-split rule value and returns all rule parts
824
+ # in the order they appear in the value.
825
+ # The leftmost label is not considered a label.
826
+ #
827
+ # See http://publicsuffix.org/format/:
828
+ # If the prevailing rule is a exception rule,
829
+ # modify it by removing the leftmost label.
830
+ #
831
+ # @return [Array<String>]
832
+ #
833
+ # source://public_suffix//lib/public_suffix/rule.rb#301
834
+ def parts; end
835
+
836
+ # Gets the original rule definition.
837
+ #
838
+ # @return [String] The rule definition.
839
+ #
840
+ # source://public_suffix//lib/public_suffix/rule.rb#278
841
+ def rule; end
842
+
843
+ class << self
844
+ # Initializes a new rule from the content.
845
+ #
846
+ # @param content [#to_s] the content of the rule
847
+ # @param private [Boolean]
848
+ #
849
+ # source://public_suffix//lib/public_suffix/rule.rb#271
850
+ def build(content, private: T.unsafe(nil)); end
851
+ end
852
+ end
853
+
854
+ # Normal represents a standard rule (e.g. com).
855
+ #
856
+ # source://public_suffix//lib/public_suffix/rule.rb#187
857
+ class PublicSuffix::Rule::Normal < ::PublicSuffix::Rule::Base
858
+ # Decomposes the domain name according to rule properties.
859
+ #
860
+ # @param domain [#to_s] The domain name to decompose
861
+ # @return [Array<String>] The array with [trd + sld, tld].
862
+ #
863
+ # source://public_suffix//lib/public_suffix/rule.rb#200
864
+ def decompose(domain); end
865
+
866
+ # dot-split rule value and returns all rule parts
867
+ # in the order they appear in the value.
868
+ #
869
+ # @return [Array<String>]
870
+ #
871
+ # source://public_suffix//lib/public_suffix/rule.rb#210
872
+ def parts; end
873
+
874
+ # Gets the original rule definition.
875
+ #
876
+ # @return [String] The rule definition.
877
+ #
878
+ # source://public_suffix//lib/public_suffix/rule.rb#192
879
+ def rule; end
880
+ end
881
+
882
+ # Wildcard represents a wildcard rule (e.g. *.co.uk).
883
+ #
884
+ # source://public_suffix//lib/public_suffix/rule.rb#217
885
+ class PublicSuffix::Rule::Wildcard < ::PublicSuffix::Rule::Base
886
+ # Initializes a new rule.
887
+ #
888
+ # @param value [String]
889
+ # @param length [Integer]
890
+ # @param private [Boolean]
891
+ # @return [Wildcard] a new instance of Wildcard
892
+ #
893
+ # source://public_suffix//lib/public_suffix/rule.rb#232
894
+ def initialize(value:, length: T.unsafe(nil), private: T.unsafe(nil)); end
895
+
896
+ # Decomposes the domain name according to rule properties.
897
+ #
898
+ # @param domain [#to_s] The domain name to decompose
899
+ # @return [Array<String>] The array with [trd + sld, tld].
900
+ #
901
+ # source://public_suffix//lib/public_suffix/rule.rb#248
902
+ def decompose(domain); end
903
+
904
+ # dot-split rule value and returns all rule parts
905
+ # in the order they appear in the value.
906
+ #
907
+ # @return [Array<String>]
908
+ #
909
+ # source://public_suffix//lib/public_suffix/rule.rb#258
910
+ def parts; end
911
+
912
+ # Gets the original rule definition.
913
+ #
914
+ # @return [String] The rule definition.
915
+ #
916
+ # source://public_suffix//lib/public_suffix/rule.rb#240
917
+ def rule; end
918
+
919
+ class << self
920
+ # Initializes a new rule from the content.
921
+ #
922
+ # @param content [String] the content of the rule
923
+ # @param private [Boolean]
924
+ #
925
+ # source://public_suffix//lib/public_suffix/rule.rb#223
926
+ def build(content, private: T.unsafe(nil)); end
927
+ end
928
+ end
929
+
930
+ # source://public_suffix//lib/public_suffix.rb#27
931
+ PublicSuffix::STAR = T.let(T.unsafe(nil), String)
932
+
933
+ # @return [String] the current library version
934
+ #
935
+ # source://public_suffix//lib/public_suffix/version.rb#12
936
+ PublicSuffix::VERSION = T.let(T.unsafe(nil), String)