checkoff 0.223.0 → 0.225.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/checkoff.gemspec +10 -5
  3. data/lib/checkoff/cli.rb +1 -1
  4. data/lib/checkoff/clients.rb +1 -1
  5. data/lib/checkoff/custom_fields.rb +1 -1
  6. data/lib/checkoff/events.rb +1 -1
  7. data/lib/checkoff/internal/config_loader.rb +2 -3
  8. data/lib/checkoff/internal/selector_classes/section/function_evaluator.rb +3 -2
  9. data/lib/checkoff/my_tasks.rb +1 -1
  10. data/lib/checkoff/portfolios.rb +11 -9
  11. data/lib/checkoff/projects.rb +1 -1
  12. data/lib/checkoff/sections.rb +3 -4
  13. data/lib/checkoff/tags.rb +66 -17
  14. data/lib/checkoff/tasks.rb +1 -1
  15. data/lib/checkoff/version.rb +1 -1
  16. data/lib/checkoff/workspaces.rb +1 -1
  17. data/rbi/checkoff.rbi +4529 -0
  18. data/sig/checkoff.rbs +3749 -0
  19. metadata +4 -210
  20. data/.circleci/config.yml +0 -291
  21. data/.envrc +0 -9
  22. data/.git-hooks/pre_commit/circle_ci.rb +0 -26
  23. data/.git-hooks/pre_commit/punchlist.rb +0 -52
  24. data/.git-hooks/pre_commit/solargraph_typecheck.rb +0 -77
  25. data/.gitattributes +0 -6
  26. data/.gitignore +0 -65
  27. data/.markdownlint_style.rb +0 -4
  28. data/.mdlrc +0 -1
  29. data/.overcommit.yml +0 -115
  30. data/.rubocop.yml +0 -143
  31. data/.rubocop_todo.yml +0 -90
  32. data/.solargraph.yml +0 -35
  33. data/.yamllint.yml +0 -8
  34. data/.yardopts +0 -2
  35. data/CODE_OF_CONDUCT.md +0 -133
  36. data/CONTRIBUTING.rst +0 -75
  37. data/DEVELOPMENT.md +0 -69
  38. data/GLOSSARY.md +0 -16
  39. data/Gemfile +0 -67
  40. data/Gemfile.lock +0 -351
  41. data/LICENSE +0 -21
  42. data/Makefile +0 -139
  43. data/bin/brakeman +0 -27
  44. data/bin/bump +0 -29
  45. data/bin/checkoff +0 -29
  46. data/bin/console +0 -15
  47. data/bin/overcommit +0 -29
  48. data/bin/overcommit_branch +0 -114
  49. data/bin/rake +0 -29
  50. data/bin/rubocop +0 -27
  51. data/bin/setup +0 -8
  52. data/bin/solargraph +0 -27
  53. data/bin/sord +0 -27
  54. data/bin/spoom +0 -27
  55. data/bin/srb +0 -27
  56. data/bin/srb-rbi +0 -27
  57. data/bin/tapioca +0 -27
  58. data/bin/yard +0 -27
  59. data/config/annotations_asana.rb +0 -253
  60. data/config/annotations_misc.rb +0 -68
  61. data/config/env.1p +0 -2
  62. data/docs/.gitignore +0 -3
  63. data/docs/cookiecutter_input.json +0 -17
  64. data/docs/example_project.png +0 -0
  65. data/fix.sh +0 -534
  66. data/metrics/bigfiles_high_water_mark +0 -1
  67. data/metrics/brakeman_high_water_mark +0 -1
  68. data/metrics/bundle-audit_high_water_mark +0 -1
  69. data/metrics/cane_high_water_mark +0 -1
  70. data/metrics/eslint_high_water_mark +0 -1
  71. data/metrics/flake8_high_water_mark +0 -1
  72. data/metrics/flay_high_water_mark +0 -1
  73. data/metrics/flog_high_water_mark +0 -1
  74. data/metrics/jscs_high_water_mark +0 -1
  75. data/metrics/mdl_high_water_mark +0 -1
  76. data/metrics/pep8_high_water_mark +0 -1
  77. data/metrics/punchlist_high_water_mark +0 -1
  78. data/metrics/pycodestyle_high_water_mark +0 -1
  79. data/metrics/rails_best_practices_high_water_mark +0 -1
  80. data/metrics/rubocop_high_water_mark +0 -1
  81. data/metrics/scalastyle_high_water_mark +0 -1
  82. data/metrics/shellcheck_high_water_mark +0 -1
  83. data/package.json +0 -9
  84. data/rakelib/citest.rake +0 -4
  85. data/rakelib/clear_metrics.rake +0 -9
  86. data/rakelib/console.rake +0 -15
  87. data/rakelib/default.rake +0 -4
  88. data/rakelib/doc.rake +0 -6
  89. data/rakelib/gem_tasks.rake +0 -3
  90. data/rakelib/localtest.rake +0 -4
  91. data/rakelib/overcommit.rake +0 -6
  92. data/rakelib/quality.rake +0 -4
  93. data/rakelib/repl.rake +0 -4
  94. data/rakelib/test.rake +0 -10
  95. data/rakelib/trigger_next_builds.rake +0 -7
  96. data/rakelib/undercover.rake +0 -8
  97. data/requirements_dev.txt +0 -2
  98. data/sorbet/config +0 -4
  99. data/sorbet/rbi/annotations/.gitattributes +0 -1
  100. data/sorbet/rbi/annotations/activesupport.rbi +0 -453
  101. data/sorbet/rbi/annotations/faraday.rbi +0 -17
  102. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  103. data/sorbet/rbi/annotations/mocha.rbi +0 -34
  104. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  105. data/sorbet/rbi/annotations/webmock.rbi +0 -9
  106. data/sorbet/rbi/dsl/.gitattributes +0 -1
  107. data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -23
  108. data/sorbet/rbi/gems/.gitattributes +0 -1
  109. data/sorbet/rbi/gems/activesupport@7.1.5.rbi +0 -18746
  110. data/sorbet/rbi/gems/addressable@2.8.6.rbi +0 -1994
  111. data/sorbet/rbi/gems/ansi@1.5.0.rbi +0 -688
  112. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +0 -6142
  113. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
  114. data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -523
  115. data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
  116. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
  117. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +0 -78
  118. data/sorbet/rbi/gems/brakeman@6.2.2.rbi +0 -222
  119. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -505
  120. data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
  121. data/sorbet/rbi/gems/cache@0.4.1.rbi +0 -211
  122. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +0 -293
  123. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +0 -9
  124. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +0 -383
  125. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
  126. data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -9
  127. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +0 -11591
  128. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
  129. data/sorbet/rbi/gems/crack@0.4.5.rbi +0 -145
  130. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -969
  131. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -377
  132. data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
  133. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -9
  134. data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -152
  135. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +0 -222
  136. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +0 -126
  137. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +0 -136
  138. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +0 -145
  139. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +0 -259
  140. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +0 -142
  141. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +0 -118
  142. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +0 -125
  143. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +0 -133
  144. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +0 -198
  145. data/sorbet/rbi/gems/faraday@1.10.3.rbi +0 -2729
  146. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +0 -29
  147. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +0 -1004
  148. data/sorbet/rbi/gems/gli@2.22.0.rbi +0 -9
  149. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +0 -351
  150. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -9
  151. data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
  152. data/sorbet/rbi/gems/imagen@0.1.8.rbi +0 -340
  153. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +0 -899
  154. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +0 -22
  155. data/sorbet/rbi/gems/json@2.7.1.rbi +0 -1562
  156. data/sorbet/rbi/gems/jwt@2.7.1.rbi +0 -1405
  157. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -128
  158. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3272
  159. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
  160. data/sorbet/rbi/gems/logger@1.6.2.rbi +0 -923
  161. data/sorbet/rbi/gems/mdl@0.13.0.rbi +0 -445
  162. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -273
  163. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +0 -127
  164. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +0 -1252
  165. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +0 -136
  166. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +0 -1014
  167. data/sorbet/rbi/gems/minitest@5.21.1.rbi +0 -1539
  168. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +0 -314
  169. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +0 -581
  170. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +0 -629
  171. data/sorbet/rbi/gems/mocha@2.1.0.rbi +0 -12
  172. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  173. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +0 -102
  174. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +0 -234
  175. data/sorbet/rbi/gems/mutex_m@0.3.0.rbi +0 -97
  176. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  177. data/sorbet/rbi/gems/nokogiri@1.17.0.rbi +0 -8201
  178. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +0 -833
  179. data/sorbet/rbi/gems/overcommit@0.64.1.rbi +0 -2400
  180. data/sorbet/rbi/gems/parallel@1.23.0.rbi +0 -274
  181. data/sorbet/rbi/gems/parlour@5.0.0.rbi +0 -3007
  182. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +0 -7253
  183. data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
  184. data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10070
  185. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +0 -936
  186. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +0 -173
  187. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
  188. data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4896
  189. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  190. data/sorbet/rbi/gems/rake@13.1.0.rbi +0 -3022
  191. data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
  192. data/sorbet/rbi/gems/rbs@2.8.4.rbi +0 -5613
  193. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +0 -3750
  194. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -390
  195. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4964
  196. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +0 -7127
  197. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +0 -2577
  198. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +0 -3262
  199. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -329
  200. data/sorbet/rbi/gems/rubocop-rspec@3.0.0.rbi +0 -7546
  201. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +0 -57238
  202. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
  203. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
  204. data/sorbet/rbi/gems/rugged@1.6.3.rbi +0 -1577
  205. data/sorbet/rbi/gems/securerandom@0.4.0.rbi +0 -75
  206. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -217
  207. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +0 -256
  208. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
  209. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
  210. data/sorbet/rbi/gems/solargraph-rails@1.1.0-9dc37915bd4f3b169046e34db6fb32193ab347d8.rbi +0 -320
  211. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +0 -9396
  212. data/sorbet/rbi/gems/sord@5.1.0.rbi +0 -820
  213. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +0 -317
  214. data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
  215. data/sorbet/rbi/gems/tapioca@0.16.5.rbi +0 -3617
  216. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  217. data/sorbet/rbi/gems/tilt@2.4.0.rbi +0 -933
  218. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +0 -9
  219. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  220. data/sorbet/rbi/gems/undercover@0.5.0.rbi +0 -433
  221. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -66
  222. data/sorbet/rbi/gems/webmock@3.19.1.rbi +0 -1769
  223. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  224. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18406
  225. data/sorbet/rbi/todo.rbi +0 -11
  226. data/sorbet/tapioca/config.yml +0 -13
  227. data/sorbet/tapioca/require.rb +0 -4
@@ -1,936 +0,0 @@
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)