roast-ai 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.claude/commands/docs/write-comments.md +1 -1
  3. data/.rubocop.yml +12 -1
  4. data/Gemfile +2 -2
  5. data/Gemfile.lock +149 -34
  6. data/README.md +56 -3
  7. data/examples/agent_with_multiple_prompts.rb +27 -0
  8. data/examples/custom_logging.rb +4 -2
  9. data/examples/demo/Gemfile.lock +49 -15
  10. data/examples/plugin-gem-example/Gemfile.lock +19 -15
  11. data/examples/simple_chat.rb +1 -1
  12. data/examples/simple_pi_agent.rb +18 -0
  13. data/internal/rubocop/cop/roast/no_test_class_nesting.rb +126 -0
  14. data/internal/rubocop/rubocop-roast.yml +6 -0
  15. data/internal/workflows/maintenance/branch_docs_impact.rb +97 -0
  16. data/internal/workflows/maintenance/deprecated_models_docs_updater.rb +78 -0
  17. data/lib/roast/cog/config.rb +1 -1
  18. data/lib/roast/cog/output.rb +2 -1
  19. data/lib/roast/cog/registry.rb +3 -3
  20. data/lib/roast/cog_input_manager.rb +28 -7
  21. data/lib/roast/cogs/agent/config.rb +2 -2
  22. data/lib/roast/cogs/agent/input.rb +20 -22
  23. data/lib/roast/cogs/agent/providers/claude/claude_invocation.rb +13 -5
  24. data/lib/roast/cogs/agent/providers/claude/messages/result_message.rb +1 -1
  25. data/lib/roast/cogs/agent/providers/claude/tool_result.rb +344 -4
  26. data/lib/roast/cogs/agent/providers/claude/tool_use.rb +356 -1
  27. data/lib/roast/cogs/agent/providers/claude.rb +16 -3
  28. data/lib/roast/cogs/agent/providers/pi/messages/tool_call_message.rb +60 -0
  29. data/lib/roast/cogs/agent/providers/pi/messages/tool_result_message.rb +57 -0
  30. data/lib/roast/cogs/agent/providers/pi/pi_invocation.rb +352 -0
  31. data/lib/roast/cogs/agent/providers/pi.rb +41 -0
  32. data/lib/roast/cogs/agent/stats.rb +29 -0
  33. data/lib/roast/cogs/agent/usage.rb +22 -0
  34. data/lib/roast/cogs/agent.rb +5 -6
  35. data/lib/roast/cogs/chat/config.rb +28 -2
  36. data/lib/roast/cogs/chat.rb +82 -10
  37. data/lib/roast/event.rb +1 -0
  38. data/lib/roast/event_monitor.rb +35 -3
  39. data/lib/roast/log.rb +21 -0
  40. data/lib/roast/log_formatter.rb +9 -7
  41. data/lib/roast/version.rb +1 -1
  42. data/lib/roast.rb +1 -3
  43. data/roast-ai.gemspec +2 -1
  44. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +549 -383
  45. data/sorbet/rbi/gems/addressable@2.8.7.rbi +46 -44
  46. data/sorbet/rbi/gems/ast@2.4.3.rbi +7 -6
  47. data/sorbet/rbi/gems/async@2.34.0.rbi +21 -3
  48. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +7 -7
  49. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +198 -1
  50. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +405 -328
  51. data/sorbet/rbi/gems/console@1.34.2.rbi +2 -2
  52. data/sorbet/rbi/gems/docile@1.4.1.rbi +30 -30
  53. data/sorbet/rbi/gems/drb@2.2.3.rbi +25 -25
  54. data/sorbet/rbi/gems/erubi@1.13.1.rbi +2 -0
  55. data/sorbet/rbi/gems/faraday-net_http@3.4.2.rbi +2 -77
  56. data/sorbet/rbi/gems/faraday-retry@2.3.2.rbi +2 -57
  57. data/sorbet/rbi/gems/faraday@2.14.1.rbi +382 -75
  58. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +1 -110
  59. data/sorbet/rbi/gems/guard-minitest@2.4.6.rbi +0 -139
  60. data/sorbet/rbi/gems/guard@2.19.1.rbi +38 -38
  61. data/sorbet/rbi/gems/hashdiff@1.2.0.rbi +3 -3
  62. data/sorbet/rbi/gems/i18n@1.14.7.rbi +53 -29
  63. data/sorbet/rbi/gems/io-event@1.14.0.rbi +67 -10
  64. data/sorbet/rbi/gems/json@2.18.1.rbi +227 -5
  65. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +83 -0
  66. data/sorbet/rbi/gems/listen@3.9.0.rbi +7 -7
  67. data/sorbet/rbi/gems/logger@1.7.0.rbi +3 -3
  68. data/sorbet/rbi/gems/lumberjack@1.2.10.rbi +21 -21
  69. data/sorbet/rbi/gems/marcel@1.1.0.rbi +1 -1
  70. data/sorbet/rbi/gems/minitest-rg@5.3.0.rbi +0 -96
  71. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1 -16
  72. data/sorbet/rbi/gems/net-http@0.9.1.rbi +27 -19
  73. data/sorbet/rbi/gems/netrc@0.11.0.rbi +18 -0
  74. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +20 -20
  75. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +149 -15
  76. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +141 -139
  77. data/sorbet/rbi/gems/prism@1.4.0.rbi +922 -864
  78. data/sorbet/rbi/gems/public_suffix@6.0.2.rbi +56 -35
  79. data/sorbet/rbi/gems/racc@1.8.1.rbi +10 -2
  80. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +12 -12
  81. data/sorbet/rbi/gems/rake@13.3.0.rbi +219 -318
  82. data/sorbet/rbi/gems/{rbi@0.3.6.rbi → rbi@0.3.9.rbi} +612 -2267
  83. data/sorbet/rbi/gems/{rbs@3.9.4.rbi → rbs@4.0.0.dev.5.rbi} +2013 -680
  84. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +151 -113
  85. data/sorbet/rbi/gems/require-hooks@0.2.3.rbi +110 -0
  86. data/sorbet/rbi/gems/rexml@3.4.2.rbi +24 -51
  87. data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +506 -815
  88. data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +16 -16
  89. data/sorbet/rbi/gems/rubocop@1.77.0.rbi +2692 -2327
  90. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -8
  91. data/sorbet/rbi/gems/ruby_llm@1.8.2.rbi +38 -23
  92. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +1 -1
  93. data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +2 -131
  94. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +28 -127
  95. data/sorbet/rbi/gems/{spoom@1.6.3.rbi → spoom@1.7.11.rbi} +1139 -2246
  96. data/sorbet/rbi/gems/sqlite3@2.9.0.rbi +91 -1
  97. data/sorbet/rbi/gems/{tapioca@0.16.11.rbi → tapioca@0.17.10.rbi} +721 -835
  98. data/sorbet/rbi/gems/thor@1.4.0.rbi +53 -53
  99. data/sorbet/rbi/gems/tsort@0.2.0.rbi +393 -0
  100. data/sorbet/rbi/gems/type_toolkit@0.0.5.rbi +49 -0
  101. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +144 -143
  102. data/sorbet/rbi/gems/uri@1.1.1.rbi +7 -7
  103. data/sorbet/rbi/gems/vcr@6.3.1.rbi +53 -36
  104. data/sorbet/rbi/gems/webmock@3.25.1.rbi +38 -13
  105. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +39 -272
  106. data/sorbet/rbi/shims/lib/roast/execution_context.rbi +3 -3
  107. data/tutorial/01_your_first_workflow/README.md +9 -5
  108. data/tutorial/01_your_first_workflow/configured_chat.rb +1 -1
  109. data/tutorial/02_chaining_cogs/README.md +2 -2
  110. data/tutorial/02_chaining_cogs/code_review.rb +1 -1
  111. data/tutorial/02_chaining_cogs/session_resumption.rb +1 -1
  112. data/tutorial/03_targets_and_params/README.md +1 -1
  113. data/tutorial/04_configuration_options/README.md +2 -2
  114. data/tutorial/08_iterative_workflows/README.md +1 -1
  115. data/tutorial/README.md +1 -1
  116. metadata +39 -17
  117. data/docs/AGENT_STEPS.md +0 -288
  118. data/docs/INSTRUMENTATION.md +0 -243
  119. data/docs/ITERATION_SYNTAX.md +0 -147
  120. data/docs/VALIDATION.md +0 -178
  121. data/lib/roast/nil_assertions.rb +0 -23
  122. /data/internal/documentation/{architectural-notes.md → comments/architectural-notes.md} +0 -0
  123. /data/internal/documentation/{doc-comments-external.md → comments/doc-comments-external.md} +0 -0
  124. /data/internal/documentation/{doc-comments-internal.md → comments/doc-comments-internal.md} +0 -0
  125. /data/internal/documentation/{doc-comments.md → comments/doc-comments.md} +0 -0
@@ -33,7 +33,7 @@ end
33
33
  #
34
34
  # @private
35
35
  #
36
- # source://tzinfo//lib/tzinfo/transition_rule.rb#120
36
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#129
37
37
  class TZInfo::AbsoluteDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule
38
38
  # Initializes a new {AbsoluteDayOfYearTransitionRule}.
39
39
  #
@@ -68,7 +68,7 @@ class TZInfo::AbsoluteDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRul
68
68
  # with the same {transition_at} and day as this
69
69
  # {AbsoluteDayOfYearTransitionRule}, otherwise `false`.
70
70
  #
71
- # source://tzinfo//lib/tzinfo/transition_rule.rb#153
71
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#156
72
72
  def eql?(r); end
73
73
 
74
74
  # @return [Boolean] `true` if the day specified by this transition is the
@@ -125,14 +125,14 @@ class TZInfo::AmbiguousTime < ::StandardError; end
125
125
  class TZInfo::AnnualRules
126
126
  # Initializes a new {AnnualRules} instance.
127
127
  #
128
- # @param std_offset [TimezoneOffset] the standard offset that applies when
129
- # daylight savings time is not in force.
128
+ # @param dst_end_rule [TransitionRule] the rule that determines when daylight
129
+ # savings time ends.
130
130
  # @param dst_offset [TimezoneOffset] the offset that applies when daylight
131
131
  # savings time is in force.
132
132
  # @param dst_start_rule [TransitionRule] the rule that determines when
133
133
  # daylight savings time starts.
134
- # @param dst_end_rule [TransitionRule] the rule that determines when daylight
135
- # savings time ends.
134
+ # @param std_offset [TimezoneOffset] the standard offset that applies when
135
+ # daylight savings time is not in force.
136
136
  # @return [AnnualRules] a new instance of AnnualRules
137
137
  #
138
138
  # source://tzinfo//lib/tzinfo/annual_rules.rb#36
@@ -176,8 +176,8 @@ class TZInfo::AnnualRules
176
176
 
177
177
  # Applies a given rule between offsets on a year.
178
178
  #
179
- # @param rule [TransitionRule] the rule to apply.
180
179
  # @param from_offset [TimezoneOffset] the offset the rule transitions from.
180
+ # @param rule [TransitionRule] the rule to apply.
181
181
  # @param to_offset [TimezoneOffset] the offset the rule transitions to.
182
182
  # @param year [Integer] the year when the transition occurs.
183
183
  # @return [TimezoneTransition] the transition determined by the rule.
@@ -346,7 +346,7 @@ class TZInfo::Country
346
346
  # @return [Array<String>] an `Array` containing the identifier for each time
347
347
  # zone observed by the country
348
348
  #
349
- # source://tzinfo//lib/tzinfo/country.rb#111
349
+ # source://tzinfo//lib/tzinfo/country.rb#114
350
350
  def zone_names; end
351
351
 
352
352
  # Returns An `Array` containing a {Timezone} instance for each time zone
@@ -433,10 +433,10 @@ class TZInfo::CountryTimezone
433
433
  # {CountryTimezone} instances should normally only be constructed
434
434
  # by implementations of {DataSource}.
435
435
  #
436
+ # @param description [String] an optional description of the time zone.
436
437
  # @param identifier [String] the {Timezone} identifier.
437
438
  # @param latitude [Rational] the latitude of the time zone.
438
439
  # @param longitude [Rational] the longitude of the time zone.
439
- # @param description [String] an optional description of the time zone.
440
440
  # @return [CountryTimezone] a new instance of CountryTimezone
441
441
  #
442
442
  # source://tzinfo//lib/tzinfo/country_timezone.rb#44
@@ -653,11 +653,11 @@ class TZInfo::DataSource
653
653
  # {DataSources::CountryInfo} is returned. Otherwise an {InvalidCountryCode}
654
654
  # exception is raised.
655
655
  #
656
- # @param hash [String, DataSources::CountryInfo] a mapping from ISO 3166-1
657
- # alpha-2 country codes to {DataSources::CountryInfo} instances.
658
656
  # @param code [String] a country code to lookup.
659
657
  # @param encoding [Encoding] the encoding used for the country codes in
660
658
  # `hash`.
659
+ # @param hash [String, DataSources::CountryInfo] a mapping from ISO 3166-1
660
+ # alpha-2 country codes to {DataSources::CountryInfo} instances.
661
661
  # @raise [InvalidCountryCode] if `code` was not found in `hash`.
662
662
  # @return [DataSources::CountryInfo] the {DataSources::CountryInfo} instance
663
663
  # corresponding to `code`.
@@ -729,9 +729,9 @@ class TZInfo::DataSource
729
729
  #
730
730
  # fails and `string` is already encoded with `encoding`.
731
731
  #
732
- # @param string [String] The `String` to perform the operation on.
733
732
  # @param encoding [Encoding] The `Encoding` to use if the initial attempt
734
733
  # fails.
734
+ # @param string [String] The `String` to perform the operation on.
735
735
  # @return [Object] the result of the operation or `nil` if the first attempt
736
736
  # @yield [s] the caller will be yielded to once or twice to attempt the
737
737
  # operation.
@@ -807,10 +807,10 @@ class TZInfo::DataSource
807
807
  # zoneinfo directory instead (using the search path specified by
808
808
  # {DataSources::ZoneinfoDataSource.search_path}).
809
809
  #
810
- # @param data_source_or_type [Object] either `:ruby`, `:zoneinfo` or an
811
- # instance of a {DataSource}.
812
810
  # @param args [Array<Object>] when `data_source_or_type` is a symbol,
813
811
  # optional arguments to use when initializing the data source.
812
+ # @param data_source_or_type [Object] either `:ruby`, `:zoneinfo` or an
813
+ # instance of a {DataSource}.
814
814
  # @raise [ArgumentError] if `data_source_or_type` is not `:ruby`,
815
815
  # `:zoneinfo` or an instance of {DataSource}.
816
816
  #
@@ -851,8 +851,8 @@ class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < ::TZInfo::DataSource
851
851
  # The passed in `identifier` instance will be frozen. A reference to the
852
852
  # passed in {TimezoneOffset} will be retained.
853
853
  #
854
- # @param identifier [String] the identifier of the time zone.
855
854
  # @param constant_offset [TimezoneOffset] the constantly observed offset.
855
+ # @param identifier [String] the identifier of the time zone.
856
856
  # @raise [ArgumentError] if `identifier` or `constant_offset` is `nil`.
857
857
  # @return [ConstantOffsetDataTimezoneInfo] a new instance of ConstantOffsetDataTimezoneInfo
858
858
  #
@@ -878,8 +878,8 @@ class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < ::TZInfo::DataSource
878
878
  # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#35
879
879
  def periods_for_local(local_timestamp); end
880
880
 
881
- # @param to_timestamp [Timestamp] ignored.
882
881
  # @param from_timestamp [Timestamp] ignored.
882
+ # @param to_timestamp [Timestamp] ignored.
883
883
  # @return [Array] an empty `Array`, since there are no transitions in time
884
884
  # zones that observe a constant offset.
885
885
  #
@@ -992,12 +992,12 @@ class TZInfo::DataSources::DataTimezoneInfo < ::TZInfo::DataSources::TimezoneInf
992
992
  # Transitions returned are ordered by when they occur, from earliest to
993
993
  # latest.
994
994
  #
995
- # @param to_timestamp [Timestamp] a {Timestamp} with a specified
996
- # {Timestamp#utc_offset utc_offset}. Transitions are returned if they
997
- # occur before this time.
998
995
  # @param from_timestamp [Timestamp] an optional {Timestamp} with a
999
996
  # specified {Timestamp#utc_offset utc_offset}. If specified, transitions
1000
997
  # are returned if they occur at or after this time.
998
+ # @param to_timestamp [Timestamp] a {Timestamp} with a specified
999
+ # {Timestamp#utc_offset utc_offset}. Transitions are returned if they
1000
+ # occur before this time.
1001
1001
  # @raise [ArgumentError] may be raised if `to_timestamp` is `nil` or does
1002
1002
  # not have a specified {Timestamp#utc_offset utc_offset}.
1003
1003
  # @raise [ArgumentError] may be raised if `from_timestamp` is specified
@@ -1112,8 +1112,8 @@ class TZInfo::DataSources::PosixTimeZoneParser
1112
1112
  # Scans for a pattern and raises an exception if the pattern does not
1113
1113
  # match the input.
1114
1114
  #
1115
- # @param s [StringScanner] the `StringScanner` to scan.
1116
1115
  # @param pattern [Regexp] the pattern to match.
1116
+ # @param s [StringScanner] the `StringScanner` to scan.
1117
1117
  # @raise [InvalidPosixTimeZone] if the pattern does not match the input.
1118
1118
  # @return [String] the result of the scan.
1119
1119
  #
@@ -1405,12 +1405,12 @@ class TZInfo::DataSources::TransitionsDataTimezoneInfo < ::TZInfo::DataSources::
1405
1405
  # Transitions returned are ordered by when they occur, from earliest to
1406
1406
  # latest.
1407
1407
  #
1408
- # @param to_timestamp [Timestamp] a {Timestamp} with a specified
1409
- # {Timestamp#utc_offset utc_offset}. Transitions are returned if they
1410
- # occur before this time.
1411
1408
  # @param from_timestamp [Timestamp] an optional {Timestamp} with a
1412
1409
  # specified {Timestamp#utc_offset utc_offset}. If specified, transitions
1413
1410
  # are returned if they occur at or after this time.
1411
+ # @param to_timestamp [Timestamp] a {Timestamp} with a specified
1412
+ # {Timestamp#utc_offset utc_offset}. Transitions are returned if they
1413
+ # occur before this time.
1414
1414
  # @raise [ArgumentError] may be raised if `to_timestamp` is `nil` or does
1415
1415
  # not have a specified {Timestamp#utc_offset utc_offset}.
1416
1416
  # @raise [ArgumentError] may be raised if `from_timestamp` is specified
@@ -1448,8 +1448,8 @@ class TZInfo::DataSources::TransitionsDataTimezoneInfo < ::TZInfo::DataSources::
1448
1448
  # Determines if a transition occurs at or after a given {Timestamp},
1449
1449
  # taking the {Timestamp#sub_second sub_second} into consideration.
1450
1450
  #
1451
- # @param transition [TimezoneTransition] the transition to compare.
1452
1451
  # @param timestamp [Timestamp] the timestamp to compare.
1452
+ # @param transition [TimezoneTransition] the transition to compare.
1453
1453
  # @return [Boolean] `true` if `transition` occurs at or after `timestamp`,
1454
1454
  # otherwise `false`.
1455
1455
  #
@@ -1528,10 +1528,10 @@ class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource
1528
1528
  # searched to find an iso3166.tab file if one of the searched zoneinfo
1529
1529
  # directories doesn't contain an iso3166.tab file.
1530
1530
  #
1531
- # @param zoneinfo_dir [String] an optional path to a directory to use as
1532
- # the source of zoneinfo files.
1533
1531
  # @param alternate_iso3166_tab_path [String] an optional path to the
1534
1532
  # iso3166.tab file.
1533
+ # @param zoneinfo_dir [String] an optional path to a directory to use as
1534
+ # the source of zoneinfo files.
1535
1535
  # @raise [InvalidZoneinfoDirectory] if the iso3166.tab and zone1970.tab or
1536
1536
  # zone.tab files cannot be found using the `zoneinfo_dir` and
1537
1537
  # `alternate_iso3166_tab_path` parameters.
@@ -1614,10 +1614,10 @@ class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource
1614
1614
 
1615
1615
  # Converts degrees, minutes and seconds to a Rational.
1616
1616
  #
1617
- # @param sign [String] `'-'` or `'+'`.
1618
1617
  # @param degrees [String] the number of degrees.
1619
1618
  # @param minutes [String] the number of minutes.
1620
1619
  # @param seconds [String] the number of seconds (optional).
1620
+ # @param sign [String] `'-'` or `'+'`.
1621
1621
  # @return [Rational] the result of converting from degrees, minutes and
1622
1622
  # seconds to a `Rational`.
1623
1623
  #
@@ -1670,11 +1670,11 @@ class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource
1670
1670
  # Attempts to resolve the path to a tab file given its standard names and
1671
1671
  # tab sub-directory name (as used on Solaris).
1672
1672
  #
1673
- # @param zoneinfo_path [String] the path to a zoneinfo directory.
1674
1673
  # @param standard_names [Array<String>] the standard names for the tab
1675
1674
  # file.
1676
1675
  # @param tab_name [String] the alternate name for the tab file to check in
1677
1676
  # the tab sub-directory.
1677
+ # @param zoneinfo_path [String] the path to a zoneinfo directory.
1678
1678
  # @return [String] the path to the tab file.
1679
1679
  #
1680
1680
  # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#372
@@ -1688,9 +1688,9 @@ class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource
1688
1688
  # This is treated as either absolute or relative to the current working
1689
1689
  # directory.
1690
1690
  #
1691
- # @param path [String] the path to a possible zoneinfo directory.
1692
1691
  # @param iso3166_tab_path [String] an optional path to an external
1693
1692
  # iso3166.tab file.
1693
+ # @param path [String] the path to a possible zoneinfo directory.
1694
1694
  # @return [Array<String>] an `Array` containing the iso3166.tab and
1695
1695
  # zone.tab paths if the directory is valid, otherwise `nil`.
1696
1696
  #
@@ -1767,10 +1767,10 @@ class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource
1767
1767
  # Processes a path for use as the {search_path} or
1768
1768
  # {alternate_iso3166_tab_search_path}.
1769
1769
  #
1770
+ # @param default [Array<String>] the default value.
1770
1771
  # @param path [Object] either `nil` or a list of paths to check as
1771
1772
  # either an `Array` of `String` or a `File::PATH_SEPARATOR` separated
1772
1773
  # `String`.
1773
- # @param default [Array<String>] the default value.
1774
1774
  # @return [Array<String>] the processed path.
1775
1775
  #
1776
1776
  # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#187
@@ -1851,11 +1851,11 @@ class TZInfo::DataSources::ZoneinfoReader
1851
1851
  # the future (at the time of loading zoneinfo_reader.rb).
1852
1852
  #
1853
1853
  # @param file [IO] the file being processed.
1854
- # @param transitions [Array<TimezoneTransition>] the defined transitions.
1855
1854
  # @param offsets [Array<TimezoneOffset>] the offsets used by the defined
1856
1855
  # transitions.
1857
1856
  # @param rules [Object] a {TimezoneOffset} specifying a constant offset or
1858
1857
  # {AnnualRules} instance specfying transitions.
1858
+ # @param transitions [Array<TimezoneTransition>] the defined transitions.
1859
1859
  # @raise [InvalidZoneinfoFile] if the first offset does not match the
1860
1860
  # rules.
1861
1861
  # @raise [InvalidZoneinfoFile] if the previous offset of the first
@@ -1886,8 +1886,8 @@ class TZInfo::DataSources::ZoneinfoReader
1886
1886
  # Reads the given number of bytes from the given file and checks that the
1887
1887
  # correct number of bytes could be read.
1888
1888
  #
1889
- # @param file [IO] the file to read from.
1890
1889
  # @param bytes [Integer] the number of bytes to read.
1890
+ # @param file [IO] the file to read from.
1891
1891
  # @raise [InvalidZoneinfoFile] if the number of bytes available didn't
1892
1892
  # match the number requested.
1893
1893
  # @return [String] the bytes that were read.
@@ -1899,8 +1899,8 @@ class TZInfo::DataSources::ZoneinfoReader
1899
1899
  # for DST periods. Derive the base offset (base_utc_offset) where DST is
1900
1900
  # observed from either the previous or next non-DST period.
1901
1901
  #
1902
- # @param transitions [Array<Hash>] an `Array` of transition hashes.
1903
1902
  # @param offsets [Array<Hash>] an `Array` of offset hashes.
1903
+ # @param transitions [Array<Hash>] an `Array` of transition hashes.
1904
1904
  # @return [Integer] the index of the offset to be used prior to the first
1905
1905
  # transition.
1906
1906
  #
@@ -1910,8 +1910,8 @@ class TZInfo::DataSources::ZoneinfoReader
1910
1910
  # Finds an offset that is equivalent to the one specified in the given
1911
1911
  # `Array`. Matching is performed with {TimezoneOffset#==}.
1912
1912
  #
1913
- # @param offsets [Array<TimezoneOffset>] an `Array` to search.
1914
1913
  # @param offset [TimezoneOffset] the offset to search for.
1914
+ # @param offsets [Array<TimezoneOffset>] an `Array` to search.
1915
1915
  # @return [TimezoneOffset] the matching offset from `offsets` or `nil`
1916
1916
  # if not found.
1917
1917
  #
@@ -1966,9 +1966,9 @@ class TZInfo::DataSources::ZoneinfoReader
1966
1966
  # requirement for loaded time zones by reusing offsets for rule-generated
1967
1967
  # transitions.
1968
1968
  #
1969
+ # @param annual_rules [AnnualRules] the {AnnualRules} instance to check.
1969
1970
  # @param offsets [Array<TimezoneOffset>] an `Array` to search for
1970
1971
  # equivalent offsets.
1971
- # @param annual_rules [AnnualRules] the {AnnualRules} instance to check.
1972
1972
  # @return [AnnualRules] either a new {AnnualRules} instance with either
1973
1973
  # the {AnnualRules#std_offset std_offset} or {AnnualRules#dst_offset
1974
1974
  # dst_offset} replaced, or the original instance if no equivalent for
@@ -1987,10 +1987,10 @@ class TZInfo::DataSources::ZoneinfoReader
1987
1987
  # abbreviations differ.
1988
1988
  #
1989
1989
  # @param file [IO] the file being processed.
1990
- # @param last_defined [TimezoneTransition] the last defined transition in
1991
- # the file.
1992
1990
  # @param first_rule_offset [TimezoneOffset] the offset the rules indicate
1993
1991
  # is observed prior to the first rules generated transition.
1992
+ # @param last_defined [TimezoneTransition] the last defined transition in
1993
+ # the file.
1994
1994
  # @raise [InvalidZoneinfoFile] if the offset of {last_defined} and
1995
1995
  # {first_rule_offset} do not match.
1996
1996
  # @return [TimezoneTransition] the last defined transition (either the
@@ -2070,10 +2070,10 @@ class TZInfo::DataTimezone < ::TZInfo::InfoTimezone
2070
2070
  # inclusive. If a transition falls precisely on `to`, it will be excluded.
2071
2071
  # If a transition falls on `from`, it will be included.
2072
2072
  #
2073
- # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
2074
- # latest (exclusive) transition to return.
2075
2073
  # @param from [Object] an optional `Time`, `DateTime` or {Timestamp}
2076
2074
  # specifying the earliest (inclusive) transition to return.
2075
+ # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
2076
+ # latest (exclusive) transition to return.
2077
2077
  # @raise [ArgumentError] if `from` is specified and `to` is not greater than
2078
2078
  # `from`.
2079
2079
  # @raise [ArgumentError] is raised if `to` is `nil`.
@@ -2206,17 +2206,17 @@ end
2206
2206
  #
2207
2207
  # @private
2208
2208
  #
2209
- # source://tzinfo//lib/tzinfo/transition_rule.rb#323
2209
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#339
2210
2210
  class TZInfo::DayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule
2211
2211
  # Initializes a new {DayOfMonthTransitionRule}.
2212
2212
  #
2213
+ # @param day_of_week [Integer] the day of the week when the transition
2214
+ # occurs. 0 is Sunday, 6 is Saturday.
2215
+ # @param month [Integer] the month of the year when the transition occurs.
2213
2216
  # @param transition_at [Integer] the time in seconds after midnight local
2214
2217
  # time at which the transition occurs.
2215
2218
  # @param week [Integer] the week of the month when the transition occurs (1
2216
2219
  # to 4).
2217
- # @param day_of_week [Integer] the day of the week when the transition
2218
- # occurs. 0 is Sunday, 6 is Saturday.
2219
- # @param month [Integer] the month of the year when the transition occurs.
2220
2220
  # @raise [ArgumentError] if `week` is less than 1 or greater than 4.
2221
2221
  # @raise [ArgumentError] if `day_of_week` is not an `Integer`.
2222
2222
  # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6.
@@ -2248,7 +2248,7 @@ class TZInfo::DayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule
2248
2248
  # same {transition_at}, month, week and day of week as this
2249
2249
  # {DayOfMonthTransitionRule}, otherwise `false`.
2250
2250
  #
2251
- # source://tzinfo//lib/tzinfo/transition_rule.rb#353
2251
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#356
2252
2252
  def eql?(r); end
2253
2253
 
2254
2254
  protected
@@ -2284,15 +2284,15 @@ end
2284
2284
  # @abstract
2285
2285
  # @private
2286
2286
  #
2287
- # source://tzinfo//lib/tzinfo/transition_rule.rb#261
2287
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#273
2288
2288
  class TZInfo::DayOfWeekTransitionRule < ::TZInfo::TransitionRule
2289
2289
  # Initializes a new {DayOfWeekTransitionRule}.
2290
2290
  #
2291
- # @param transition_at [Integer] the time in seconds after midnight local
2292
- # time at which the transition occurs.
2293
2291
  # @param day_of_week [Integer] the day of the week when the transition
2294
2292
  # occurs. 0 is Sunday, 6 is Saturday.
2295
2293
  # @param month [Integer] the month of the year when the transition occurs.
2294
+ # @param transition_at [Integer] the time in seconds after midnight local
2295
+ # time at which the transition occurs.
2296
2296
  # @raise [ArgumentError] if `day_of_week` is not an `Integer`.
2297
2297
  # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6.
2298
2298
  # @raise [ArgumentError] if `month` is not an `Integer`.
@@ -2322,7 +2322,7 @@ class TZInfo::DayOfWeekTransitionRule < ::TZInfo::TransitionRule
2322
2322
  # same {transition_at}, month and day of week as this
2323
2323
  # {DayOfWeekTransitionRule}, otherwise `false`.
2324
2324
  #
2325
- # source://tzinfo//lib/tzinfo/transition_rule.rb#299
2325
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#302
2326
2326
  def eql?(r); end
2327
2327
 
2328
2328
  # @return [Boolean] `false`.
@@ -2360,7 +2360,7 @@ end
2360
2360
  # @abstract
2361
2361
  # @private
2362
2362
  #
2363
- # source://tzinfo//lib/tzinfo/transition_rule.rb#73
2363
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#81
2364
2364
  class TZInfo::DayOfYearTransitionRule < ::TZInfo::TransitionRule
2365
2365
  # Initializes a new {DayOfYearTransitionRule}.
2366
2366
  #
@@ -2392,7 +2392,7 @@ class TZInfo::DayOfYearTransitionRule < ::TZInfo::TransitionRule
2392
2392
  # same {transition_at} and day as this {DayOfYearTransitionRule},
2393
2393
  # otherwise `false`.
2394
2394
  #
2395
- # source://tzinfo//lib/tzinfo/transition_rule.rb#94
2395
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#97
2396
2396
  def eql?(r); end
2397
2397
 
2398
2398
  protected
@@ -2422,7 +2422,7 @@ module TZInfo::Format1; end
2422
2422
  #
2423
2423
  # @private
2424
2424
  #
2425
- # source://tzinfo//lib/tzinfo/format1/country_definer.rb#10
2425
+ # source://tzinfo//lib/tzinfo/format1/country_definer.rb#11
2426
2426
  class TZInfo::Format1::CountryDefiner < ::TZInfo::Format2::CountryDefiner
2427
2427
  # Initializes a new {CountryDefiner}.
2428
2428
  #
@@ -2490,14 +2490,14 @@ end
2490
2490
  class TZInfo::Format1::TimezoneDefiner < ::TZInfo::Format2::TimezoneDefiner
2491
2491
  # Defines an offset.
2492
2492
  #
2493
+ # @param abbreviation [Symbol] an abbreviation for the offset, for
2494
+ # example, `:EST` or `:EDT`.
2493
2495
  # @param id [Symbol] an arbitrary value used identify the offset in
2494
2496
  # subsequent calls to transition. It must be unique.
2495
- # @param utc_offset [Integer] the base offset from UTC of the zone in
2496
- # seconds. This does not include daylight savings time.
2497
2497
  # @param std_offset [Integer] the daylight savings offset from the base
2498
2498
  # offset in seconds. Typically either 0 or 3600.
2499
- # @param abbreviation [Symbol] an abbreviation for the offset, for
2500
- # example, `:EST` or `:EDT`.
2499
+ # @param utc_offset [Integer] the base offset from UTC of the zone in
2500
+ # seconds. This does not include daylight savings time.
2501
2501
  # @raise [ArgumentError] if another offset has already been defined with
2502
2502
  # the given id.
2503
2503
  #
@@ -2508,8 +2508,12 @@ class TZInfo::Format1::TimezoneDefiner < ::TZInfo::Format2::TimezoneDefiner
2508
2508
  #
2509
2509
  # Transitions must be defined in increasing time order.
2510
2510
  #
2511
- # @param year [Integer] the UTC year in which the transition occurs. Used
2512
- # in earlier versions of TZInfo, but now ignored.
2511
+ # @param datetime_denominator [Integer] the time of the transition as the
2512
+ # denominator of the `Rational` returned by `DateTime#ajd`. Used in
2513
+ # earlier versions of TZInfo, but now ignored.
2514
+ # @param datetime_numerator [Integer] the time of the transition as the
2515
+ # numerator of the `Rational` returned by `DateTime#ajd`. Used in
2516
+ # earlier versions of TZInfo, but now ignored.
2513
2517
  # @param month [Integer] the UTC month in which the transition occurs.
2514
2518
  # Used in earlier versions of TZInfo, but now ignored.
2515
2519
  # @param offset_id [Symbol] references the id of a previously defined
@@ -2517,12 +2521,8 @@ class TZInfo::Format1::TimezoneDefiner < ::TZInfo::Format2::TimezoneDefiner
2517
2521
  # @param timestamp_value [Integer] the time the transition occurs as an
2518
2522
  # Integer number of seconds since 1970-01-01 00:00:00 UTC ignoring leap
2519
2523
  # seconds (i.e. each day is treated as if it were 86,400 seconds long).
2520
- # @param datetime_numerator [Integer] the time of the transition as the
2521
- # numerator of the `Rational` returned by `DateTime#ajd`. Used in
2522
- # earlier versions of TZInfo, but now ignored.
2523
- # @param datetime_denominator [Integer] the time of the transition as the
2524
- # denominator of the `Rational` returned by `DateTime#ajd`. Used in
2525
- # earlier versions of TZInfo, but now ignored.
2524
+ # @param year [Integer] the UTC year in which the transition occurs. Used
2525
+ # in earlier versions of TZInfo, but now ignored.
2526
2526
  # @raise [ArgumentError] if `offset_id` does not reference a defined
2527
2527
  # offset.
2528
2528
  # @raise [ArgumentError] if `timestamp_value` is not greater than the
@@ -2648,13 +2648,13 @@ module TZInfo::Format2; end
2648
2648
  class TZInfo::Format2::CountryDefiner
2649
2649
  # Initializes a new {CountryDefiner}.
2650
2650
  #
2651
+ # @param description_deduper [StringDeduper] a {StringDeduper} instance to
2652
+ # use when deduping time zone descriptions.
2653
+ # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to
2654
+ # use when deduping time zone identifiers.
2651
2655
  # @param shared_timezones [Hash<Symbol, CountryTimezone>] a `Hash`
2652
2656
  # containing time zones shared by more than one country, keyed by a
2653
2657
  # unique reference.
2654
- # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to
2655
- # use when deduping time zone identifiers.
2656
- # @param description_deduper [StringDeduper] a {StringDeduper} instance to
2657
- # use when deduping time zone descriptions.
2658
2658
  # @return [CountryDefiner] a new instance of CountryDefiner
2659
2659
  #
2660
2660
  # source://tzinfo//lib/tzinfo/format2/country_definer.rb#24
@@ -2682,10 +2682,10 @@ end
2682
2682
  class TZInfo::Format2::CountryIndexDefiner
2683
2683
  # Initializes a new {CountryIndexDefiner}.
2684
2684
  #
2685
- # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to
2686
- # use when deduping time zone identifiers.
2687
2685
  # @param description_deduper [StringDeduper] a {StringDeduper} instance to
2688
2686
  # use when deduping time zone descriptions.
2687
+ # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to
2688
+ # use when deduping time zone identifiers.
2689
2689
  # @return [CountryIndexDefiner] a new instance of CountryIndexDefiner
2690
2690
  #
2691
2691
  # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#21
@@ -2713,13 +2713,13 @@ class TZInfo::Format2::CountryIndexDefiner
2713
2713
  # subsequent use in country definitions. The latitude and longitude are
2714
2714
  # given as the numerator and denominator of a `Rational`.
2715
2715
  #
2716
- # @param reference [Symbol] a unique reference for the time zone.
2716
+ # @param description [String] an optional description for the time zone.
2717
2717
  # @param identifier [String] the time zone identifier.
2718
- # @param latitude_numerator [Integer] the numerator of the latitude.
2719
2718
  # @param latitude_denominator [Integer] the denominator of the latitude.
2720
- # @param longitude_numerator [Integer] the numerator of the longitude.
2719
+ # @param latitude_numerator [Integer] the numerator of the latitude.
2721
2720
  # @param longitude_denominator [Integer] the denominator of the longitude.
2722
- # @param description [String] an optional description for the time zone.
2721
+ # @param longitude_numerator [Integer] the numerator of the longitude.
2722
+ # @param reference [Symbol] a unique reference for the time zone.
2723
2723
  #
2724
2724
  # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#39
2725
2725
  def timezone(reference, identifier, latitude_numerator, latitude_denominator, longitude_numerator, longitude_denominator, description = T.unsafe(nil)); end
@@ -2801,14 +2801,14 @@ class TZInfo::Format2::TimezoneDefiner
2801
2801
 
2802
2802
  # Defines an offset.
2803
2803
  #
2804
- # @param id [Symbol] an arbitrary value used identify the offset in
2805
- # subsequent calls to transition. It must be unique.
2804
+ # @param abbreviation [String] an abbreviation for the offset, for
2805
+ # example, EST or EDT.
2806
2806
  # @param base_utc_offset [Integer] the base offset from UTC of the zone in
2807
2807
  # seconds. This does not include daylight savings time.
2808
+ # @param id [Symbol] an arbitrary value used identify the offset in
2809
+ # subsequent calls to transition. It must be unique.
2808
2810
  # @param std_offset [Integer] the daylight savings offset from the base
2809
2811
  # offset in seconds. Typically either 0 or 3600.
2810
- # @param abbreviation [String] an abbreviation for the offset, for
2811
- # example, EST or EDT.
2812
2812
  # @raise [ArgumentError] if another offset has already been defined with
2813
2813
  # the given id.
2814
2814
  #
@@ -3062,7 +3062,7 @@ class TZInfo::InvalidTimezoneIdentifier < ::StandardError; end
3062
3062
  #
3063
3063
  # @private
3064
3064
  #
3065
- # source://tzinfo//lib/tzinfo/transition_rule.rb#184
3065
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#185
3066
3066
  class TZInfo::JulianDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule
3067
3067
  # Initializes a new {JulianDayOfYearTransitionRule}.
3068
3068
  #
@@ -3097,7 +3097,7 @@ class TZInfo::JulianDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule
3097
3097
  # the same {transition_at} and day as this
3098
3098
  # {JulianDayOfYearTransitionRule}, otherwise `false`.
3099
3099
  #
3100
- # source://tzinfo//lib/tzinfo/transition_rule.rb#226
3100
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#229
3101
3101
  def eql?(r); end
3102
3102
 
3103
3103
  # @return [Boolean] `true` if the day specified by this transition is the
@@ -3148,15 +3148,15 @@ TZInfo::JulianDayOfYearTransitionRule::YEAR = T.let(T.unsafe(nil), Integer)
3148
3148
  #
3149
3149
  # @private
3150
3150
  #
3151
- # source://tzinfo//lib/tzinfo/transition_rule.rb#396
3151
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#408
3152
3152
  class TZInfo::LastDayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule
3153
3153
  # Initializes a new {LastDayOfMonthTransitionRule}.
3154
3154
  #
3155
- # @param transition_at [Integer] the time in seconds after midnight local
3156
- # time at which the transition occurs.
3157
3155
  # @param day_of_week [Integer] the day of the week when the transition
3158
3156
  # occurs. 0 is Sunday, 6 is Saturday.
3159
3157
  # @param month [Integer] the month of the year when the transition occurs.
3158
+ # @param transition_at [Integer] the time in seconds after midnight local
3159
+ # time at which the transition occurs.
3160
3160
  # @raise [ArgumentError] if `day_of_week` is not an `Integer`.
3161
3161
  # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6.
3162
3162
  # @raise [ArgumentError] if `month` is not an `Integer`.
@@ -3186,7 +3186,7 @@ class TZInfo::LastDayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule
3186
3186
  # the same {transition_at}, month and day of week as this
3187
3187
  # {LastDayOfMonthTransitionRule}, otherwise `false`.
3188
3188
  #
3189
- # source://tzinfo//lib/tzinfo/transition_rule.rb#420
3189
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#423
3190
3190
  def eql?(r); end
3191
3191
 
3192
3192
  protected
@@ -3280,10 +3280,10 @@ class TZInfo::LinkedTimezone < ::TZInfo::InfoTimezone
3280
3280
  # inclusive. If a transition falls precisely on `to`, it will be excluded.
3281
3281
  # If a transition falls on `from`, it will be included.
3282
3282
  #
3283
- # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
3284
- # latest (exclusive) transition to return.
3285
3283
  # @param from [Object] an optional `Time`, `DateTime` or {Timestamp}
3286
3284
  # specifying the earliest (inclusive) transition to return.
3285
+ # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
3286
+ # latest (exclusive) transition to return.
3287
3287
  # @raise [ArgumentError] if `from` is specified and `to` is not greater than
3288
3288
  # `from`.
3289
3289
  # @raise [ArgumentError] is raised if `to` is `nil`.
@@ -3332,7 +3332,7 @@ class TZInfo::OffsetTimezonePeriod < ::TZInfo::TimezonePeriod
3332
3332
  # @return [Boolean] `true` if `p` is a {OffsetTimezonePeriod} with the same
3333
3333
  # {offset}, otherwise `false`.
3334
3334
  #
3335
- # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#32
3335
+ # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#35
3336
3336
  def eql?(p); end
3337
3337
 
3338
3338
  # @return [Integer] a hash based on {offset}.
@@ -3457,7 +3457,7 @@ class TZInfo::TimeWithOffset < ::Time
3457
3457
  # @return [Boolean] `true` if daylight savings time is being observed,
3458
3458
  # otherwise `false`.
3459
3459
  #
3460
- # source://tzinfo//lib/tzinfo/time_with_offset.rb#43
3460
+ # source://tzinfo//lib/tzinfo/time_with_offset.rb#47
3461
3461
  def isdst; end
3462
3462
 
3463
3463
  # An overridden version of `Time#localtime` that clears the associated
@@ -3555,14 +3555,14 @@ class TZInfo::Timestamp
3555
3555
 
3556
3556
  # Initializes a new {Timestamp}.
3557
3557
  #
3558
- # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC
3559
- # ignoring leap seconds.
3560
- # @param utc_offset [Object] either `nil` for a {Timestamp} without a
3561
- # specified offset, an offset from UTC specified as an `Integer` number of
3562
- # seconds or the `Symbol` `:utc`).
3563
3558
  # @param sub_second [Numeric] the fractional part of the second as either a
3564
3559
  # `Rational` that is greater than or equal to 0 and less than 1, or
3565
3560
  # the `Integer` 0.
3561
+ # @param utc_offset [Object] either `nil` for a {Timestamp} without a
3562
+ # specified offset, an offset from UTC specified as an `Integer` number of
3563
+ # seconds or the `Symbol` `:utc`).
3564
+ # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC
3565
+ # ignoring leap seconds.
3566
3566
  # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` and
3567
3567
  # not the `Symbol` `:utc`.
3568
3568
  # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the
@@ -3607,6 +3607,7 @@ class TZInfo::Timestamp
3607
3607
  # source://tzinfo//lib/tzinfo/timestamp.rb#372
3608
3608
  def add_and_set_utc_offset(seconds, utc_offset); end
3609
3609
 
3610
+ # source://tzinfo//lib/tzinfo/timestamp.rb#464
3610
3611
  def eql?(_arg0); end
3611
3612
 
3612
3613
  # @return [Integer] a hash based on the value, sub-second and whether there
@@ -3723,14 +3724,14 @@ class TZInfo::Timestamp
3723
3724
  # method is used internally within {Timestamp} to avoid the overhead of
3724
3725
  # checking parameters.
3725
3726
  #
3726
- # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC
3727
- # ignoring leap seconds.
3728
3727
  # @param sub_second [Numeric] the fractional part of the second as either a
3729
3728
  # `Rational` that is greater than or equal to 0 and less than 1, or the
3730
3729
  # `Integer` 0.
3731
3730
  # @param utc_offset [Object] either `nil` for a {Timestamp} without a
3732
3731
  # specified offset, an offset from UTC specified as an `Integer` number of
3733
3732
  # seconds or the `Symbol` `:utc`).
3733
+ # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC
3734
+ # ignoring leap seconds.
3734
3735
  #
3735
3736
  # source://tzinfo//lib/tzinfo/timestamp.rb#538
3736
3737
  def initialize!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end
@@ -3761,10 +3762,10 @@ class TZInfo::Timestamp
3761
3762
  # and time parameters will be interpreted as a local date and time with
3762
3763
  # the given offset.
3763
3764
  #
3764
- # @param month [Integer] the month (1-12).
3765
3765
  # @param day [Integer] the day of the month (1-31).
3766
3766
  # @param hour [Integer] the hour (0-23).
3767
3767
  # @param minute [Integer] the minute (0-59).
3768
+ # @param month [Integer] the month (1-12).
3768
3769
  # @param second [Integer] the second (0-59).
3769
3770
  # @param sub_second [Numeric] the fractional part of the second as either
3770
3771
  # a `Rational` that is greater than or equal to 0 and less than 1, or
@@ -3807,12 +3808,12 @@ class TZInfo::Timestamp
3807
3808
  # as though it were UTC (the {Timestamp} representation will have a
3808
3809
  # {utc_offset} of 0 and {utc?} will return `true`).
3809
3810
  #
3810
- # @param value [Object] a `Time`, `DateTime` or {Timestamp}.
3811
3811
  # @param offset [Symbol] either `:preserve` to preserve the offset of
3812
3812
  # `value`, `:ignore` to ignore the offset of `value` and create a
3813
3813
  # {Timestamp} with an unspecified offset, or `:treat_as_utc` to treat
3814
3814
  # the offset of `value` as though it were UTC and create a UTC
3815
3815
  # {Timestamp}.
3816
+ # @param value [Object] a `Time`, `DateTime` or {Timestamp}.
3816
3817
  # @raise [ArgumentError]
3817
3818
  # @return [Object] if called without a block, the {Timestamp}
3818
3819
  # representation of `value`, otherwise the result of the block,
@@ -3829,11 +3830,11 @@ class TZInfo::Timestamp
3829
3830
 
3830
3831
  # Creates a new UTC {Timestamp}.
3831
3832
  #
3832
- # @param value [Integer] the number of seconds since 1970-01-01 00:00:00
3833
- # UTC ignoring leap seconds.
3834
3833
  # @param sub_second [Numeric] the fractional part of the second as either
3835
3834
  # a `Rational` that is greater than or equal to 0 and less than 1, or
3836
3835
  # the `Integer` 0.
3836
+ # @param value [Integer] the number of seconds since 1970-01-01 00:00:00
3837
+ # UTC ignoring leap seconds.
3837
3838
  # @raise [ArgumentError] if `value` is not an `Integer`.
3838
3839
  # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the
3839
3840
  # `Integer` 0.
@@ -3861,10 +3862,10 @@ class TZInfo::Timestamp
3861
3862
  # Creates a {Timestamp} that represents a given `Time`, optionally
3862
3863
  # ignoring the offset.
3863
3864
  #
3864
- # @param time [Time] a `Time`.
3865
3865
  # @param ignore_offset [Boolean] whether to ignore the offset of `time`.
3866
3866
  # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC
3867
3867
  # offset of the result (`:utc`, `nil` or an `Integer`).
3868
+ # @param time [Time] a `Time`.
3868
3869
  # @return [Timestamp] the {Timestamp} representation of `time`.
3869
3870
  #
3870
3871
  # source://tzinfo//lib/tzinfo/timestamp.rb#206
@@ -3874,10 +3875,10 @@ class TZInfo::Timestamp
3874
3875
  # optionally ignoring the offset (if the `time_like` responds to
3875
3876
  # `utc_offset`).
3876
3877
  #
3877
- # @param time_like [Object] a `Time`-like object.
3878
3878
  # @param ignore_offset [Boolean] whether to ignore the offset of `time`.
3879
3879
  # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC
3880
3880
  # offset of the result (`:utc`, `nil` or an `Integer`).
3881
+ # @param time_like [Object] a `Time`-like object.
3881
3882
  # @return [Timestamp] the {Timestamp} representation of `time_like`.
3882
3883
  #
3883
3884
  # source://tzinfo//lib/tzinfo/timestamp.rb#296
@@ -3888,11 +3889,11 @@ class TZInfo::Timestamp
3888
3889
  # same instance is returned. If the passed in value is an instance of a
3889
3890
  # subclass of {Timestamp}, then a new {Timestamp} will always be returned.
3890
3891
  #
3891
- # @param timestamp [Timestamp] a {Timestamp}.
3892
3892
  # @param ignore_offset [Boolean] whether to ignore the offset of
3893
3893
  # `timestamp`.
3894
3894
  # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC
3895
3895
  # offset of the result (`:utc`, `nil` or an `Integer`).
3896
+ # @param timestamp [Timestamp] a {Timestamp}.
3896
3897
  # @return [Timestamp] a [Timestamp] representation of `timestamp`.
3897
3898
  #
3898
3899
  # source://tzinfo//lib/tzinfo/timestamp.rb#256
@@ -3913,14 +3914,14 @@ class TZInfo::Timestamp
3913
3914
  # internally within {Timestamp} to avoid the overhead of checking
3914
3915
  # parameters.
3915
3916
  #
3916
- # @param value [Integer] the number of seconds since 1970-01-01 00:00:00
3917
- # UTC ignoring leap seconds.
3918
3917
  # @param sub_second [Numeric] the fractional part of the second as either
3919
3918
  # a `Rational` that is greater than or equal to 0 and less than 1, or
3920
3919
  # the `Integer` 0.
3921
3920
  # @param utc_offset [Object] either `nil` for a {Timestamp} without a
3922
3921
  # specified offset, an offset from UTC specified as an `Integer` number
3923
3922
  # of seconds or the `Symbol` `:utc`).
3923
+ # @param value [Integer] the number of seconds since 1970-01-01 00:00:00
3924
+ # UTC ignoring leap seconds.
3924
3925
  # @return [Timestamp] a new instance of `self`.
3925
3926
  #
3926
3927
  # source://tzinfo//lib/tzinfo/timestamp.rb#192
@@ -4092,7 +4093,7 @@ class TZInfo::Timezone
4092
4093
  # offset.
4093
4094
  # @return [String] the abbreviation of this {Timezone} at the given time.
4094
4095
  #
4095
- # source://tzinfo//lib/tzinfo/timezone.rb#1048
4096
+ # source://tzinfo//lib/tzinfo/timezone.rb#1051
4096
4097
  def abbr(time = T.unsafe(nil)); end
4097
4098
 
4098
4099
  # @param time [Object] a `Time`, `DateTime` or `Timestamp`.
@@ -4191,7 +4192,7 @@ class TZInfo::Timezone
4191
4192
  # time zone as the first element and the current {TimezonePeriod} for the
4192
4193
  # time zone as the second element.
4193
4194
  #
4194
- # source://tzinfo//lib/tzinfo/timezone.rb#1008
4195
+ # source://tzinfo//lib/tzinfo/timezone.rb#1018
4195
4196
  def current_period_and_time; end
4196
4197
 
4197
4198
  # Returns the current local time and {TimezonePeriod} for the time zone as
@@ -4301,18 +4302,18 @@ class TZInfo::Timezone
4301
4302
  #
4302
4303
  # values, interpreted as a local time in the time zone.
4303
4304
  #
4305
+ # @param day [Integer] the day of the month (1-31).
4306
+ # @param dst [Boolean] whether to resolve ambiguous local times by always
4307
+ # selecting the period observing daylight savings time (`true`), always
4308
+ # selecting the period observing standard time (`false`), or leaving the
4309
+ # ambiguity unresolved (`nil`).
4304
4310
  # @param hour [Integer] the hour (0-23).
4305
4311
  # @param minute [Integer] the minute (0-59).
4312
+ # @param month [Integer] the month (1-12).
4306
4313
  # @param second [Integer] the second (0-59).
4307
4314
  # @param sub_second [Numeric] the fractional part of the second as either
4308
4315
  # a `Rational` that is greater than or equal to 0 and less than 1, or
4309
4316
  # the `Integer` 0.
4310
- # @param dst [Boolean] whether to resolve ambiguous local times by always
4311
- # selecting the period observing daylight savings time (`true`), always
4312
- # selecting the period observing standard time (`false`), or leaving the
4313
- # ambiguity unresolved (`nil`).
4314
- # @param month [Integer] the month (1-12).
4315
- # @param day [Integer] the day of the month (1-31).
4316
4317
  # @param year [Integer] the year.
4317
4318
  # @raise [RangeError] if `sub_second` is a `Rational` but that is less
4318
4319
  # than 0 or greater than or equal to 1.
@@ -4388,18 +4389,18 @@ class TZInfo::Timezone
4388
4389
  # The default value of the `dst` parameter can be specified using
4389
4390
  # {Timezone.default_dst=}.
4390
4391
  #
4392
+ # @param day [Integer] the day of the month (1-31).
4393
+ # @param dst [Boolean] whether to resolve ambiguous local times by always
4394
+ # selecting the period observing daylight savings time (`true`), always
4395
+ # selecting the period observing standard time (`false`), or leaving the
4396
+ # ambiguity unresolved (`nil`).
4391
4397
  # @param hour [Integer] the hour (0-23).
4392
4398
  # @param minute [Integer] the minute (0-59).
4399
+ # @param month [Integer] the month (1-12).
4393
4400
  # @param second [Integer] the second (0-59).
4394
4401
  # @param sub_second [Numeric] the fractional part of the second as either
4395
4402
  # a `Rational` that is greater than or equal to 0 and less than 1, or
4396
4403
  # the `Integer` 0.
4397
- # @param dst [Boolean] whether to resolve ambiguous local times by always
4398
- # selecting the period observing daylight savings time (`true`), always
4399
- # selecting the period observing standard time (`false`), or leaving the
4400
- # ambiguity unresolved (`nil`).
4401
- # @param month [Integer] the month (1-12).
4402
- # @param day [Integer] the day of the month (1-31).
4403
4404
  # @param year [Integer] the year.
4404
4405
  # @raise [RangeError] if `sub_second` is a `Rational` but that is less
4405
4406
  # than 0 or greater than or equal to 1.
@@ -4476,18 +4477,18 @@ class TZInfo::Timezone
4476
4477
  # The default value of the `dst` parameter can be specified using
4477
4478
  # {Timezone.default_dst=}.
4478
4479
  #
4480
+ # @param day [Integer] the day of the month (1-31).
4481
+ # @param dst [Boolean] whether to resolve ambiguous local times by always
4482
+ # selecting the period observing daylight savings time (`true`), always
4483
+ # selecting the period observing standard time (`false`), or leaving the
4484
+ # ambiguity unresolved (`nil`).
4479
4485
  # @param hour [Integer] the hour (0-23).
4480
4486
  # @param minute [Integer] the minute (0-59).
4487
+ # @param month [Integer] the month (1-12).
4481
4488
  # @param second [Integer] the second (0-59).
4482
4489
  # @param sub_second [Numeric] the fractional part of the second as either
4483
4490
  # a `Rational` that is greater than or equal to 0 and less than 1, or
4484
4491
  # the `Integer` 0.
4485
- # @param dst [Boolean] whether to resolve ambiguous local times by always
4486
- # selecting the period observing daylight savings time (`true`), always
4487
- # selecting the period observing standard time (`false`), or leaving the
4488
- # ambiguity unresolved (`nil`).
4489
- # @param month [Integer] the month (1-12).
4490
- # @param day [Integer] the day of the month (1-31).
4491
4492
  # @param year [Integer] the year.
4492
4493
  # @raise [RangeError] if `sub_second` is a `Rational` but that is less
4493
4494
  # than 0 or greater than or equal to 1.
@@ -4624,10 +4625,10 @@ class TZInfo::Timezone
4624
4625
  # Comparisons with `to` are exclusive. Comparisons with `from` are
4625
4626
  # inclusive.
4626
4627
  #
4627
- # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
4628
- # latest (exclusive) offset to return.
4629
4628
  # @param from [Object] an optional `Time`, `DateTime` or {Timestamp}
4630
4629
  # specifying the earliest (inclusive) offset to return.
4630
+ # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
4631
+ # latest (exclusive) offset to return.
4631
4632
  # @raise [ArgumentError] if `from` is specified and `to` is not greater than
4632
4633
  # `from`.
4633
4634
  # @raise [ArgumentError] is raised if `to` is `nil`.
@@ -4819,10 +4820,10 @@ class TZInfo::Timezone
4819
4820
  # inclusive. If a transition falls precisely on `to`, it will be excluded.
4820
4821
  # If a transition falls on `from`, it will be included.
4821
4822
  #
4822
- # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
4823
- # latest (exclusive) transition to return.
4824
4823
  # @param from [Object] an optional `Time`, `DateTime` or {Timestamp}
4825
4824
  # specifying the earliest (inclusive) transition to return.
4825
+ # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
4826
+ # latest (exclusive) transition to return.
4826
4827
  # @raise [ArgumentError] if `from` is specified and `to` is not greater than
4827
4828
  # `from`.
4828
4829
  # @raise [ArgumentError] is raised if `to` is `nil`.
@@ -4845,7 +4846,7 @@ class TZInfo::Timezone
4845
4846
  # @return [Integer] the observed offset from UTC in seconds at the given
4846
4847
  # time.
4847
4848
  #
4848
- # source://tzinfo//lib/tzinfo/timezone.rb#1094
4849
+ # source://tzinfo//lib/tzinfo/timezone.rb#1097
4849
4850
  def utc_offset(time = T.unsafe(nil)); end
4850
4851
 
4851
4852
  # Converts a time in UTC to the local time for the time zone.
@@ -5064,9 +5065,9 @@ class TZInfo::TimezoneOffset
5064
5065
  #
5065
5066
  # The passed in `abbreviation` instance will be frozen.
5066
5067
  #
5068
+ # @param abbreviation [String] the abbreviation identifying the offset.
5067
5069
  # @param base_utc_offset [Integer] the base offset from UTC in seconds.
5068
5070
  # @param std_offset [Integer] the offset from standard time in seconds.
5069
- # @param abbreviation [String] the abbreviation identifying the offset.
5070
5071
  # @return [TimezoneOffset] a new instance of TimezoneOffset
5071
5072
  #
5072
5073
  # source://tzinfo//lib/tzinfo/timezone_offset.rb#62
@@ -5087,7 +5088,7 @@ class TZInfo::TimezoneOffset
5087
5088
  #
5088
5089
  # @return [String] the abbreviation that identifies this offset.
5089
5090
  #
5090
- # source://tzinfo//lib/tzinfo/timezone_offset.rb#50
5091
+ # source://tzinfo//lib/tzinfo/timezone_offset.rb#51
5091
5092
  def abbr; end
5092
5093
 
5093
5094
  # The abbreviation that identifies this offset. For example GMT
@@ -5186,7 +5187,7 @@ class TZInfo::TimezoneOffset
5186
5187
  #
5187
5188
  # @return [Integer] the base offset from UTC in seconds.
5188
5189
  #
5189
- # source://tzinfo//lib/tzinfo/timezone_offset.rb#21
5190
+ # source://tzinfo//lib/tzinfo/timezone_offset.rb#22
5190
5191
  def utc_offset; end
5191
5192
 
5192
5193
  # Returns the observed offset from UTC in seconds (`base_utc_offset +
@@ -5194,7 +5195,7 @@ class TZInfo::TimezoneOffset
5194
5195
  #
5195
5196
  # @return [Integer] the observed offset from UTC in seconds.
5196
5197
  #
5197
- # source://tzinfo//lib/tzinfo/timezone_offset.rb#43
5198
+ # source://tzinfo//lib/tzinfo/timezone_offset.rb#44
5198
5199
  def utc_total_offset; end
5199
5200
  end
5200
5201
 
@@ -5225,7 +5226,7 @@ class TZInfo::TimezonePeriod
5225
5226
  #
5226
5227
  # @return [String] the abbreviation that identifies this offset.
5227
5228
  #
5228
- # source://tzinfo//lib/tzinfo/timezone_period.rb#80
5229
+ # source://tzinfo//lib/tzinfo/timezone_period.rb#83
5229
5230
  def abbr; end
5230
5231
 
5231
5232
  # The abbreviation that identifies this offset. For example GMT
@@ -5371,7 +5372,7 @@ class TZInfo::TimezonePeriod
5371
5372
  #
5372
5373
  # @return [Integer] the base offset from UTC in seconds.
5373
5374
  #
5374
- # source://tzinfo//lib/tzinfo/timezone_period.rb#54
5375
+ # source://tzinfo//lib/tzinfo/timezone_period.rb#57
5375
5376
  def utc_offset; end
5376
5377
 
5377
5378
  # Returns the observed offset from UTC in seconds (`base_utc_offset +
@@ -5379,7 +5380,7 @@ class TZInfo::TimezonePeriod
5379
5380
  #
5380
5381
  # @return [Integer] the observed offset from UTC in seconds.
5381
5382
  #
5382
- # source://tzinfo//lib/tzinfo/timezone_period.rb#90
5383
+ # source://tzinfo//lib/tzinfo/timezone_period.rb#93
5383
5384
  def utc_total_offset; end
5384
5385
 
5385
5386
  # The abbreviation that identifies this offset. For example GMT
@@ -5387,7 +5388,7 @@ class TZInfo::TimezonePeriod
5387
5388
  #
5388
5389
  # @return [String] the abbreviation that identifies this offset.
5389
5390
  #
5390
- # source://tzinfo//lib/tzinfo/timezone_period.rb#80
5391
+ # source://tzinfo//lib/tzinfo/timezone_period.rb#84
5391
5392
  def zone_identifier; end
5392
5393
 
5393
5394
  private
@@ -5547,10 +5548,10 @@ class TZInfo::TimezoneProxy < ::TZInfo::Timezone
5547
5548
  # inclusive. If a transition falls precisely on `to`, it will be excluded.
5548
5549
  # If a transition falls on `from`, it will be included.
5549
5550
  #
5550
- # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
5551
- # latest (exclusive) transition to return.
5552
5551
  # @param from [Object] an optional `Time`, `DateTime` or {Timestamp}
5553
5552
  # specifying the earliest (inclusive) transition to return.
5553
+ # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the
5554
+ # latest (exclusive) transition to return.
5554
5555
  # @raise [ArgumentError] if `from` is specified and `to` is not greater than
5555
5556
  # `from`.
5556
5557
  # @raise [ArgumentError] is raised if `to` is `nil`.
@@ -5638,7 +5639,7 @@ class TZInfo::TimezoneTransition
5638
5639
  # {offset}, {previous_offset} and {timestamp_value} as this
5639
5640
  # {TimezoneTransition}, otherwise `false`.
5640
5641
  #
5641
- # source://tzinfo//lib/tzinfo/timezone_transition.rb#86
5642
+ # source://tzinfo//lib/tzinfo/timezone_transition.rb#90
5642
5643
  def eql?(tti); end
5643
5644
 
5644
5645
  # @return [Integer] a hash based on {offset}, {previous_offset} and
@@ -5741,7 +5742,7 @@ class TZInfo::TransitionRule
5741
5742
  # @return [Boolean] `true` if `r` is a {TransitionRule} with the same
5742
5743
  # {transition_at} as this {TransitionRule}, otherwise `false`.
5743
5744
  #
5744
- # source://tzinfo//lib/tzinfo/transition_rule.rb#47
5745
+ # source://tzinfo//lib/tzinfo/transition_rule.rb#50
5745
5746
  def eql?(r); end
5746
5747
 
5747
5748
  # @return [Integer] a hash based on {hash_args} (defaulting to
@@ -5780,10 +5781,10 @@ class TZInfo::TransitionsTimezonePeriod < ::TZInfo::TimezonePeriod
5780
5781
  #
5781
5782
  # At least one of `start_transition` and `end_transition` must be specified.
5782
5783
  #
5783
- # @param start_transition [TimezoneTransition] the transition that defines
5784
- # the start of the period, or `nil` if the start is unbounded.
5785
5784
  # @param end_transition [TimezoneTransition] the transition that defines the
5786
5785
  # end of the period, or `nil` if the end is unbounded.
5786
+ # @param start_transition [TimezoneTransition] the transition that defines
5787
+ # the start of the period, or `nil` if the start is unbounded.
5787
5788
  # @raise [ArgumentError] if both `start_transition` and `end_transition` are
5788
5789
  # `nil`.
5789
5790
  # @return [TransitionsTimezonePeriod] a new instance of TransitionsTimezonePeriod
@@ -5816,7 +5817,7 @@ class TZInfo::TransitionsTimezonePeriod < ::TZInfo::TimezonePeriod
5816
5817
  # same {offset}, {start_transition} and {end_transition}, otherwise
5817
5818
  # `false`.
5818
5819
  #
5819
- # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#47
5820
+ # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#50
5820
5821
  def eql?(p); end
5821
5822
 
5822
5823
  # @return [Integer] a hash based on {start_transition} and {end_transition}.