diff --git a/Gemfile.lock b/Gemfile.lock index e29cd4d..73eeb20 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,101 +7,114 @@ PATH GEM remote: https://rubygems.org/ specs: + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) ast (2.4.3) - benchmark (0.4.1) - date (3.4.1) - debug (1.11.0) + benchmark (0.5.0) + bigdecimal (4.0.1) + date (3.5.1) + debug (1.11.1) irb (~> 1.10) reline (>= 0.3.8) diff-lcs (1.6.2) - erb (5.0.2) + erb (6.0.2) erubi (1.13.1) - io-console (0.8.1) - irb (1.15.2) + io-console (0.8.2) + irb (1.17.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) - json (2.13.0) + json (2.18.1) + json-schema (6.1.0) + addressable (~> 2.8) + bigdecimal (>= 3.1, < 5) language_server-protocol (3.17.0.5) lint_roller (1.1.0) logger (1.7.0) + mcp (0.7.1) + json-schema (>= 4.1) netrc (0.11.0) parallel (1.27.0) - parser (3.3.8.0) + parser (3.3.10.2) ast (~> 2.4.1) racc - pp (0.6.2) + pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.4.0) - psych (5.2.6) + prism (1.9.0) + psych (5.3.1) date stringio + public_suffix (7.0.2) racc (1.8.1) rainbow (3.1.1) - rake (13.3.0) - rbi (0.3.6) + rake (13.3.1) + rbi (0.3.9) prism (~> 1.0) rbs (>= 3.4.4) - rbs (4.0.0.dev.4) + rbs (4.0.0.dev.5) logger prism (>= 1.3.0) - rdoc (6.14.2) + tsort + rdoc (7.2.0) erb psych (>= 4.0.0) - regexp_parser (2.10.0) - reline (0.6.1) + tsort + regexp_parser (2.11.3) + reline (0.6.3) io-console (~> 0.5) - require-hooks (0.2.2) - rexml (3.4.1) - rspec (3.13.1) + require-hooks (0.2.3) + rexml (3.4.4) + rspec (3.13.2) rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.5) + rspec-core (3.13.6) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.5) + rspec-mocks (3.13.7) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.4) - rubocop (1.78.0) + rspec-support (3.13.7) + rubocop (1.85.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) + mcp (~> 0.6) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.45.1, < 2.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.46.0) + rubocop-ast (1.49.0) parser (>= 3.3.7.2) - prism (~> 1.4) + prism (~> 1.7) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-shopify (2.17.1) + rubocop-shopify (2.18.0) rubocop (~> 1.62) - rubocop-sorbet (0.10.5) + rubocop-sorbet (0.12.0) lint_roller rubocop (>= 1.75.2) - ruby-lsp (0.26.1) + ruby-lsp (0.26.7) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) rbs (>= 3, < 5) ruby-progressbar (1.13.0) - sorbet (0.5.12353) - sorbet-static (= 0.5.12353) - sorbet-runtime (0.5.12353) - sorbet-static (0.5.12353-universal-darwin) - sorbet-static (0.5.12353-x86_64-linux) - sorbet-static-and-runtime (0.5.12353) - sorbet (= 0.5.12353) - sorbet-runtime (= 0.5.12353) - spoom (1.7.5) + sorbet (0.6.12963) + sorbet-static (= 0.6.12963) + sorbet-runtime (0.6.12963) + sorbet-static (0.6.12963-universal-darwin) + sorbet-static (0.6.12963-x86_64-linux) + sorbet-static-and-runtime (0.6.12963) + sorbet (= 0.6.12963) + sorbet-runtime (= 0.6.12963) + spoom (1.7.11) erubi (>= 1.10.0) prism (>= 0.28.0) rbi (>= 0.3.3) @@ -109,23 +122,24 @@ GEM rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - stringio (3.1.7) - tapioca (0.17.7) + stringio (3.2.0) + tapioca (0.17.10) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.3.1) + rbi (>= 0.3.7) require-hooks (>= 0.2.2) sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.7.0) + spoom (>= 1.7.9) thor (>= 1.2.0) yard-sorbet - thor (1.4.0) - unicode-display_width (3.1.4) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) - yard (0.9.37) + thor (1.5.0) + tsort (0.2.0) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.2.0) + yard (0.9.38) yard-sorbet (0.9.0) sorbet-runtime yard @@ -148,4 +162,4 @@ DEPENDENCIES tapioca (~> 0.11) BUNDLED WITH - 2.5.11 + 4.0.6 diff --git a/lib/ruby_lsp/ruby_lsp_rspec/test_discovery.rb b/lib/ruby_lsp/ruby_lsp_rspec/test_discovery.rb index 399fabb..33568e9 100644 --- a/lib/ruby_lsp/ruby_lsp_rspec/test_discovery.rb +++ b/lib/ruby_lsp/ruby_lsp_rspec/test_discovery.rb @@ -113,7 +113,7 @@ def handle_example(node) @response_builder.add_code_lens(test_item) end - #: -> ::RubyLsp::Requests::Support::TestItem?? + #: -> ::RubyLsp::Requests::Support::TestItem? def find_parent_test_group @group_stack.last end diff --git a/sorbet/rbi/gems/addressable@2.8.8.rbi b/sorbet/rbi/gems/addressable@2.8.8.rbi new file mode 100644 index 0000000..6999fe2 --- /dev/null +++ b/sorbet/rbi/gems/addressable@2.8.8.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `addressable` gem. +# Please instead update this file by running `bin/tapioca gem addressable`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/benchmark@0.4.1.rbi b/sorbet/rbi/gems/benchmark@0.5.0.rbi similarity index 90% rename from sorbet/rbi/gems/benchmark@0.4.1.rbi rename to sorbet/rbi/gems/benchmark@0.5.0.rbi index e29780e..8531eef 100644 --- a/sorbet/rbi/gems/benchmark@0.4.1.rbi +++ b/sorbet/rbi/gems/benchmark@0.5.0.rbi @@ -239,6 +239,15 @@ module Benchmark # source://benchmark//lib/benchmark.rb#303 def measure(label = T.unsafe(nil)); end + # Returns the elapsed real time used to execute the given block. + # The unit of time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + # source://benchmark//lib/benchmark.rb#335 + def ms; end + # Returns the elapsed real time used to execute the given block. # The unit of time is seconds. # @@ -290,7 +299,7 @@ module Benchmark # >total: 2.930000 0.000000 2.930000 ( 2.932889) # >avg: 0.976667 0.000000 0.976667 ( 0.977630) # - # source://benchmark//lib/benchmark.rb#328 + # source://benchmark//lib/benchmark.rb#341 def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end # A simple interface to the #benchmark method, #bm generates sequential @@ -313,7 +322,7 @@ module Benchmark # times: 0.960000 0.000000 0.960000 ( 0.960423) # upto: 0.950000 0.000000 0.950000 ( 0.954864) # - # source://benchmark//lib/benchmark.rb#328 + # source://benchmark//lib/benchmark.rb#341 def bm(label_width = T.unsafe(nil), *labels, &blk); end # Sometimes benchmark results are skewed because code executed @@ -353,7 +362,7 @@ module Benchmark # #bmbm yields a Benchmark::Job object and returns an array of # Benchmark::Tms objects. # - # source://benchmark//lib/benchmark.rb#328 + # source://benchmark//lib/benchmark.rb#341 def bmbm(width = T.unsafe(nil)); end # Returns the time used to execute the given block as a @@ -372,16 +381,25 @@ module Benchmark # # 0.220000 0.000000 0.220000 ( 0.227313) # - # source://benchmark//lib/benchmark.rb#328 + # source://benchmark//lib/benchmark.rb#341 def measure(label = T.unsafe(nil)); end + # Returns the elapsed real time used to execute the given block. + # The unit of time is milliseconds. + # + # Benchmark.ms { "a" * 1_000_000_000 } + # #=> 509.8029999935534 + # + # source://benchmark//lib/benchmark.rb#341 + def ms; end + # Returns the elapsed real time used to execute the given block. # The unit of time is seconds. # # Benchmark.realtime { "a" * 1_000_000_000 } # #=> 0.5098029999935534 # - # source://benchmark//lib/benchmark.rb#328 + # source://benchmark//lib/benchmark.rb#341 def realtime; end end end @@ -389,7 +407,7 @@ end # A Job is a sequence of labelled blocks to be processed by the # Benchmark.bmbm method. It is of little direct interest to the user. # -# source://benchmark//lib/benchmark.rb#334 +# source://benchmark//lib/benchmark.rb#347 class Benchmark::Job # Returns an initialized Job instance. # Usually, one doesn't call this method directly, as new @@ -399,38 +417,38 @@ class Benchmark::Job # # @return [Job] a new instance of Job # - # source://benchmark//lib/benchmark.rb#342 + # source://benchmark//lib/benchmark.rb#355 def initialize(width); end # Registers the given label and block pair in the job list. # # @raise [ArgumentError] # - # source://benchmark//lib/benchmark.rb#350 + # source://benchmark//lib/benchmark.rb#363 def item(label = T.unsafe(nil), &blk); end # An array of 2-element arrays, consisting of label and block pairs. # - # source://benchmark//lib/benchmark.rb#362 + # source://benchmark//lib/benchmark.rb#375 def list; end # Registers the given label and block pair in the job list. # # @raise [ArgumentError] # - # source://benchmark//lib/benchmark.rb#359 + # source://benchmark//lib/benchmark.rb#372 def report(label = T.unsafe(nil), &blk); end # Length of the widest label in the #list. # - # source://benchmark//lib/benchmark.rb#365 + # source://benchmark//lib/benchmark.rb#378 def width; end end # This class is used by the Benchmark.benchmark and Benchmark.bm methods. # It is of little direct interest to the user. # -# source://benchmark//lib/benchmark.rb#372 +# source://benchmark//lib/benchmark.rb#385 class Benchmark::Report # Returns an initialized Report instance. # Usually, one doesn't call this method directly, as new @@ -440,43 +458,43 @@ class Benchmark::Report # # @return [Report] a new instance of Report # - # source://benchmark//lib/benchmark.rb#380 + # source://benchmark//lib/benchmark.rb#393 def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end # An array of Benchmark::Tms objects representing each item. # - # source://benchmark//lib/benchmark.rb#399 + # source://benchmark//lib/benchmark.rb#412 def format; end # Prints the +label+ and measured time for the block, # formatted by +format+. See Tms#format for the # formatting rules. # - # source://benchmark//lib/benchmark.rb#389 + # source://benchmark//lib/benchmark.rb#402 def item(label = T.unsafe(nil), *format, &blk); end # An array of Benchmark::Tms objects representing each item. # - # source://benchmark//lib/benchmark.rb#399 + # source://benchmark//lib/benchmark.rb#412 def list; end # Prints the +label+ and measured time for the block, # formatted by +format+. See Tms#format for the # formatting rules. # - # source://benchmark//lib/benchmark.rb#396 + # source://benchmark//lib/benchmark.rb#409 def report(label = T.unsafe(nil), *format, &blk); end # An array of Benchmark::Tms objects representing each item. # - # source://benchmark//lib/benchmark.rb#399 + # source://benchmark//lib/benchmark.rb#412 def width; end end # A data object, representing the times associated with a benchmark # measurement. # -# source://benchmark//lib/benchmark.rb#408 +# source://benchmark//lib/benchmark.rb#421 class Benchmark::Tms # Returns an initialized Tms object which has # +utime+ as the user CPU time, +stime+ as the system CPU time, @@ -485,13 +503,13 @@ class Benchmark::Tms # # @return [Tms] a new instance of Tms # - # source://benchmark//lib/benchmark.rb#443 + # source://benchmark//lib/benchmark.rb#456 def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end # Returns a new Tms object obtained by memberwise multiplication # of the individual times for this Tms object by +x+. # - # source://benchmark//lib/benchmark.rb#491 + # source://benchmark//lib/benchmark.rb#504 def *(x); end # Returns a new Tms object obtained by memberwise summation @@ -499,27 +517,27 @@ class Benchmark::Tms # Tms object. # This method and #/() are useful for taking statistics. # - # source://benchmark//lib/benchmark.rb#478 + # source://benchmark//lib/benchmark.rb#491 def +(other); end # Returns a new Tms object obtained by memberwise subtraction # of the individual times for the +other+ Tms object from those of this # Tms object. # - # source://benchmark//lib/benchmark.rb#485 + # source://benchmark//lib/benchmark.rb#498 def -(other); end # Returns a new Tms object obtained by memberwise division # of the individual times for this Tms object by +x+. # This method and #+() are useful for taking statistics. # - # source://benchmark//lib/benchmark.rb#498 + # source://benchmark//lib/benchmark.rb#511 def /(x); end # Returns a new Tms object whose times are the sum of the times for this # Tms object, plus the time required to execute the code block (+blk+). # - # source://benchmark//lib/benchmark.rb#452 + # source://benchmark//lib/benchmark.rb#465 def add(&blk); end # An in-place version of #add. @@ -527,17 +545,17 @@ class Benchmark::Tms # for this Tms object, plus the time required to execute # the code block (+blk+). # - # source://benchmark//lib/benchmark.rb#462 + # source://benchmark//lib/benchmark.rb#475 def add!(&blk); end # System CPU time of children # - # source://benchmark//lib/benchmark.rb#426 + # source://benchmark//lib/benchmark.rb#439 def cstime; end # User CPU time of children # - # source://benchmark//lib/benchmark.rb#423 + # source://benchmark//lib/benchmark.rb#436 def cutime; end # Returns the contents of this Tms object as @@ -556,22 +574,22 @@ class Benchmark::Tms # If +format+ is not given, FORMAT is used as default value, detailing the # user, system, total and real elapsed time. # - # source://benchmark//lib/benchmark.rb#517 + # source://benchmark//lib/benchmark.rb#530 def format(format = T.unsafe(nil), *args); end # Label # - # source://benchmark//lib/benchmark.rb#435 + # source://benchmark//lib/benchmark.rb#448 def label; end # Elapsed real time # - # source://benchmark//lib/benchmark.rb#429 + # source://benchmark//lib/benchmark.rb#442 def real; end # System CPU time # - # source://benchmark//lib/benchmark.rb#420 + # source://benchmark//lib/benchmark.rb#433 def stime; end # Returns a new 6-element array, consisting of the @@ -579,27 +597,27 @@ class Benchmark::Tms # user CPU time, children's system CPU time and elapsed # real time. # - # source://benchmark//lib/benchmark.rb#542 + # source://benchmark//lib/benchmark.rb#555 def to_a; end # Returns a hash containing the same data as `to_a`. # - # source://benchmark//lib/benchmark.rb#549 + # source://benchmark//lib/benchmark.rb#562 def to_h; end # Same as #format. # - # source://benchmark//lib/benchmark.rb#532 + # source://benchmark//lib/benchmark.rb#545 def to_s; end # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ # - # source://benchmark//lib/benchmark.rb#432 + # source://benchmark//lib/benchmark.rb#445 def total; end # User CPU time # - # source://benchmark//lib/benchmark.rb#417 + # source://benchmark//lib/benchmark.rb#430 def utime; end protected @@ -611,7 +629,7 @@ class Benchmark::Tms # +op+ can be a mathematical operation such as +, -, # *, / # - # source://benchmark//lib/benchmark.rb#570 + # source://benchmark//lib/benchmark.rb#583 def memberwise(op, x); end end diff --git a/sorbet/rbi/gems/bigdecimal@4.0.1.rbi b/sorbet/rbi/gems/bigdecimal@4.0.1.rbi new file mode 100644 index 0000000..c52d9ff --- /dev/null +++ b/sorbet/rbi/gems/bigdecimal@4.0.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `bigdecimal` gem. +# Please instead update this file by running `bin/tapioca gem bigdecimal`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/date@3.4.1.rbi b/sorbet/rbi/gems/date@3.4.1.rbi deleted file mode 100644 index 1dcd7c8..0000000 --- a/sorbet/rbi/gems/date@3.4.1.rbi +++ /dev/null @@ -1,75 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `date` gem. -# Please instead update this file by running `bin/tapioca gem date`. - - -# source://date//lib/date.rb#6 -class Date - include ::Comparable - - # call-seq: - # infinite? -> false - # - # Returns +false+ - # - # @return [Boolean] - # - # source://date//lib/date.rb#13 - def infinite?; end -end - -# source://date//lib/date.rb#17 -class Date::Infinity < ::Numeric - # @return [Infinity] a new instance of Infinity - # - # source://date//lib/date.rb#19 - def initialize(d = T.unsafe(nil)); end - - # source://date//lib/date.rb#33 - def +@; end - - # source://date//lib/date.rb#32 - def -@; end - - # source://date//lib/date.rb#35 - def <=>(other); end - - # source://date//lib/date.rb#30 - def abs; end - - # source://date//lib/date.rb#51 - def coerce(other); end - - # @return [Boolean] - # - # source://date//lib/date.rb#26 - def finite?; end - - # @return [Boolean] - # - # source://date//lib/date.rb#27 - def infinite?; end - - # @return [Boolean] - # - # source://date//lib/date.rb#28 - def nan?; end - - # source://date//lib/date.rb#59 - def to_f; end - - # @return [Boolean] - # - # source://date//lib/date.rb#25 - def zero?; end - - protected - - # source://date//lib/date.rb#21 - def d; end -end - -# source://date//lib/date.rb#7 -Date::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/date@3.5.1.rbi b/sorbet/rbi/gems/date@3.5.1.rbi new file mode 100644 index 0000000..36681e8 --- /dev/null +++ b/sorbet/rbi/gems/date@3.5.1.rbi @@ -0,0 +1,403 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `date` gem. +# Please instead update this file by running `bin/tapioca gem date`. + + +# source://date//lib/date.rb#6 +class Date + include ::Comparable + + # source://date//lib/date.rb#4 + def initialize(*_arg0); end + + # source://date//lib/date.rb#4 + def +(_arg0); end + + # source://date//lib/date.rb#4 + def -(_arg0); end + + # source://date//lib/date.rb#4 + def <<(_arg0); end + + # source://date//lib/date.rb#4 + def <=>(_arg0); end + + # source://date//lib/date.rb#4 + def ===(_arg0); end + + # source://date//lib/date.rb#4 + def >>(_arg0); end + + # source://date//lib/date.rb#4 + def ajd; end + + # source://date//lib/date.rb#4 + def amjd; end + + # source://date//lib/date.rb#4 + def asctime; end + + # source://date//lib/date.rb#4 + def ctime; end + + # source://date//lib/date.rb#4 + def cwday; end + + # source://date//lib/date.rb#4 + def cweek; end + + # source://date//lib/date.rb#4 + def cwyear; end + + # source://date//lib/date.rb#4 + def day; end + + # source://date//lib/date.rb#4 + def day_fraction; end + + # source://date//lib/date.rb#4 + def deconstruct_keys(_arg0); end + + # source://date//lib/date.rb#4 + def downto(_arg0); end + + # source://date//lib/date.rb#4 + def england; end + + # source://date//lib/date.rb#4 + def eql?(_arg0); end + + # source://date//lib/date.rb#4 + def friday?; end + + # source://date//lib/date.rb#4 + def gregorian; end + + # source://date//lib/date.rb#4 + def gregorian?; end + + # source://date//lib/date.rb#4 + def hash; end + + # source://date//lib/date.rb#4 + def httpdate; end + + # call-seq: + # infinite? -> false + # + # Returns +false+ + # + # @return [Boolean] + # + # source://date//lib/date.rb#13 + def infinite?; end + + # source://date//lib/date.rb#4 + def inspect; end + + # source://date//lib/date.rb#4 + def iso8601; end + + # source://date//lib/date.rb#4 + def italy; end + + # source://date//lib/date.rb#4 + def jd; end + + # source://date//lib/date.rb#4 + def jisx0301; end + + # source://date//lib/date.rb#4 + def julian; end + + # source://date//lib/date.rb#4 + def julian?; end + + # source://date//lib/date.rb#4 + def ld; end + + # source://date//lib/date.rb#4 + def leap?; end + + # source://date//lib/date.rb#4 + def marshal_dump; end + + # source://date//lib/date.rb#4 + def marshal_load(_arg0); end + + # source://date//lib/date.rb#4 + def mday; end + + # source://date//lib/date.rb#4 + def mjd; end + + # source://date//lib/date.rb#4 + def mon; end + + # source://date//lib/date.rb#4 + def monday?; end + + # source://date//lib/date.rb#4 + def month; end + + # source://date//lib/date.rb#4 + def new_start(*_arg0); end + + # source://date//lib/date.rb#4 + def next; end + + # source://date//lib/date.rb#4 + def next_day(*_arg0); end + + # source://date//lib/date.rb#4 + def next_month(*_arg0); end + + # source://date//lib/date.rb#4 + def next_year(*_arg0); end + + # source://date//lib/date.rb#4 + def prev_day(*_arg0); end + + # source://date//lib/date.rb#4 + def prev_month(*_arg0); end + + # source://date//lib/date.rb#4 + def prev_year(*_arg0); end + + # source://date//lib/date.rb#4 + def rfc2822; end + + # source://date//lib/date.rb#4 + def rfc3339; end + + # source://date//lib/date.rb#4 + def rfc822; end + + # source://date//lib/date.rb#4 + def saturday?; end + + # source://date//lib/date.rb#4 + def start; end + + # source://date//lib/date.rb#4 + def step(*_arg0); end + + # source://date//lib/date.rb#4 + def strftime(*_arg0); end + + # source://date//lib/date.rb#4 + def succ; end + + # source://date//lib/date.rb#4 + def sunday?; end + + # source://date//lib/date.rb#4 + def thursday?; end + + # source://date//lib/date.rb#4 + def to_date; end + + # source://date//lib/date.rb#4 + def to_datetime; end + + # source://date//lib/date.rb#4 + def to_s; end + + # source://date//lib/date.rb#4 + def to_time; end + + # source://date//lib/date.rb#4 + def tuesday?; end + + # source://date//lib/date.rb#4 + def upto(_arg0); end + + # source://date//lib/date.rb#4 + def wday; end + + # source://date//lib/date.rb#4 + def wednesday?; end + + # source://date//lib/date.rb#4 + def xmlschema; end + + # source://date//lib/date.rb#4 + def yday; end + + # source://date//lib/date.rb#4 + def year; end + + private + + # source://date//lib/date.rb#4 + def hour; end + + # source://date//lib/date.rb#4 + def initialize_copy(_arg0); end + + # source://date//lib/date.rb#4 + def min; end + + # source://date//lib/date.rb#4 + def minute; end + + # source://date//lib/date.rb#4 + def sec; end + + # source://date//lib/date.rb#4 + def second; end + + class << self + # source://date//lib/date.rb#4 + def _httpdate(*_arg0); end + + # source://date//lib/date.rb#4 + def _iso8601(*_arg0); end + + # source://date//lib/date.rb#4 + def _jisx0301(*_arg0); end + + # source://date//lib/date.rb#4 + def _load(_arg0); end + + # source://date//lib/date.rb#4 + def _parse(*_arg0); end + + # source://date//lib/date.rb#4 + def _rfc2822(*_arg0); end + + # source://date//lib/date.rb#4 + def _rfc3339(*_arg0); end + + # source://date//lib/date.rb#4 + def _rfc822(*_arg0); end + + # source://date//lib/date.rb#4 + def _strptime(*_arg0); end + + # source://date//lib/date.rb#4 + def _xmlschema(*_arg0); end + + # source://date//lib/date.rb#4 + def civil(*_arg0); end + + # source://date//lib/date.rb#4 + def commercial(*_arg0); end + + # source://date//lib/date.rb#4 + def gregorian_leap?(_arg0); end + + # source://date//lib/date.rb#4 + def httpdate(*_arg0); end + + # source://date//lib/date.rb#4 + def iso8601(*_arg0); end + + # source://date//lib/date.rb#4 + def jd(*_arg0); end + + # source://date//lib/date.rb#4 + def jisx0301(*_arg0); end + + # source://date//lib/date.rb#4 + def julian_leap?(_arg0); end + + # source://date//lib/date.rb#4 + def leap?(_arg0); end + + # source://date//lib/date.rb#4 + def ordinal(*_arg0); end + + # source://date//lib/date.rb#4 + def parse(*_arg0); end + + # source://date//lib/date.rb#4 + def rfc2822(*_arg0); end + + # source://date//lib/date.rb#4 + def rfc3339(*_arg0); end + + # source://date//lib/date.rb#4 + def rfc822(*_arg0); end + + # source://date//lib/date.rb#4 + def strptime(*_arg0); end + + # source://date//lib/date.rb#4 + def today(*_arg0); end + + # source://date//lib/date.rb#4 + def valid_civil?(*_arg0); end + + # source://date//lib/date.rb#4 + def valid_commercial?(*_arg0); end + + # source://date//lib/date.rb#4 + def valid_date?(*_arg0); end + + # source://date//lib/date.rb#4 + def valid_jd?(*_arg0); end + + # source://date//lib/date.rb#4 + def valid_ordinal?(*_arg0); end + + # source://date//lib/date.rb#4 + def xmlschema(*_arg0); end + end +end + +# source://date//lib/date.rb#17 +class Date::Infinity < ::Numeric + # @return [Infinity] a new instance of Infinity + # + # source://date//lib/date.rb#19 + def initialize(d = T.unsafe(nil)); end + + # source://date//lib/date.rb#33 + def +@; end + + # source://date//lib/date.rb#32 + def -@; end + + # source://date//lib/date.rb#35 + def <=>(other); end + + # source://date//lib/date.rb#30 + def abs; end + + # source://date//lib/date.rb#51 + def coerce(other); end + + # @return [Boolean] + # + # source://date//lib/date.rb#26 + def finite?; end + + # @return [Boolean] + # + # source://date//lib/date.rb#27 + def infinite?; end + + # @return [Boolean] + # + # source://date//lib/date.rb#28 + def nan?; end + + # source://date//lib/date.rb#59 + def to_f; end + + # @return [Boolean] + # + # source://date//lib/date.rb#25 + def zero?; end + + protected + + # source://date//lib/date.rb#21 + def d; end +end + +# source://date//lib/date.rb#7 +Date::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/erb@5.0.2.rbi b/sorbet/rbi/gems/erb@5.0.2.rbi deleted file mode 100644 index fb3e710..0000000 --- a/sorbet/rbi/gems/erb@5.0.2.rbi +++ /dev/null @@ -1,887 +0,0 @@ -# typed: false - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `erb` gem. -# Please instead update this file by running `bin/tapioca gem erb`. - - -# = ERB -- Ruby Templating -# -# == Introduction -# -# ERB provides an easy to use but powerful templating system for Ruby. Using -# ERB, actual Ruby code can be added to any plain text document for the -# purposes of generating document information details and/or flow control. -# -# A very simple example is this: -# -# require 'erb' -# -# x = 42 -# template = ERB.new <<-EOF -# The value of x is: <%= x %> -# EOF -# puts template.result(binding) -# -# Prints: The value of x is: 42 -# -# More complex examples are given below. -# -# -# == Recognized Tags -# -# ERB recognizes certain tags in the provided template and converts them based -# on the rules below: -# -# <% Ruby code -- inline with output %> -# <%= Ruby expression -- replace with result %> -# <%# comment -- ignored -- useful in testing %> (`<% #` doesn't work. Don't use Ruby comments.) -# % a line of Ruby code -- treated as <% line %> (optional -- see ERB.new) -# %% replaced with % if first thing on a line and % processing is used -# <%% or %%> -- replace with <% or %> respectively -# -# All other text is passed through ERB filtering unchanged. -# -# -# == Options -# -# There are several settings you can change when you use ERB: -# * the nature of the tags that are recognized; -# * the binding used to resolve local variables in the template. -# -# See the ERB.new and ERB#result methods for more detail. -# -# == Character encodings -# -# ERB (or Ruby code generated by ERB) returns a string in the same -# character encoding as the input string. When the input string has -# a magic comment, however, it returns a string in the encoding specified -# by the magic comment. -# -# # -*- coding: utf-8 -*- -# require 'erb' -# -# template = ERB.new < -# \_\_ENCODING\_\_ is <%= \_\_ENCODING\_\_ %>. -# EOF -# puts template.result -# -# Prints: \_\_ENCODING\_\_ is Big5. -# -# -# == Examples -# -# === Plain Text -# -# ERB is useful for any generic templating situation. Note that in this example, we use the -# convenient "% at start of line" tag, and we quote the template literally with -# %q{...} to avoid trouble with the backslash. -# -# require "erb" -# -# # Create template. -# template = %q{ -# From: James Edward Gray II -# To: <%= to %> -# Subject: Addressing Needs -# -# <%= to[/\w+/] %>: -# -# Just wanted to send a quick note assuring that your needs are being -# addressed. -# -# I want you to know that my team will keep working on the issues, -# especially: -# -# <%# ignore numerous minor requests -- focus on priorities %> -# % priorities.each do |priority| -# * <%= priority %> -# % end -# -# Thanks for your patience. -# -# James Edward Gray II -# }.gsub(/^ /, '') -# -# message = ERB.new(template, trim_mode: "%<>") -# -# # Set up template data. -# to = "Community Spokesman " -# priorities = [ "Run Ruby Quiz", -# "Document Modules", -# "Answer Questions on Ruby Talk" ] -# -# # Produce result. -# email = message.result -# puts email -# -# Generates: -# -# From: James Edward Gray II -# To: Community Spokesman -# Subject: Addressing Needs -# -# Community: -# -# Just wanted to send a quick note assuring that your needs are being addressed. -# -# I want you to know that my team will keep working on the issues, especially: -# -# * Run Ruby Quiz -# * Document Modules -# * Answer Questions on Ruby Talk -# -# Thanks for your patience. -# -# James Edward Gray II -# -# === Ruby in HTML -# -# ERB is often used in .rhtml files (HTML with embedded Ruby). Notice the need in -# this example to provide a special binding when the template is run, so that the instance -# variables in the Product object can be resolved. -# -# require "erb" -# -# # Build template data class. -# class Product -# def initialize( code, name, desc, cost ) -# @code = code -# @name = name -# @desc = desc -# @cost = cost -# -# @features = [ ] -# end -# -# def add_feature( feature ) -# @features << feature -# end -# -# # Support templating of member data. -# def get_binding -# binding -# end -# -# # ... -# end -# -# # Create template. -# template = %{ -# -# Ruby Toys -- <%= @name %> -# -# -#

<%= @name %> (<%= @code %>)

-#

<%= @desc %>

-# -#
    -# <% @features.each do |f| %> -#
  • <%= f %>
  • -# <% end %> -#
-# -#

-# <% if @cost < 10 %> -# Only <%= @cost %>!!! -# <% else %> -# Call for a price, today! -# <% end %> -#

-# -# -# -# }.gsub(/^ /, '') -# -# rhtml = ERB.new(template) -# -# # Set up template data. -# toy = Product.new( "TZ-1002", -# "Rubysapien", -# "Geek's Best Friend! Responds to Ruby commands...", -# 999.95 ) -# toy.add_feature("Listens for verbal commands in the Ruby language!") -# toy.add_feature("Ignores Perl, Java, and all C variants.") -# toy.add_feature("Karate-Chop Action!!!") -# toy.add_feature("Matz signature on left leg.") -# toy.add_feature("Gem studded eyes... Rubies, of course!") -# -# # Produce result. -# rhtml.run(toy.get_binding) -# -# Generates (some blank lines removed): -# -# -# Ruby Toys -- Rubysapien -# -# -#

Rubysapien (TZ-1002)

-#

Geek's Best Friend! Responds to Ruby commands...

-# -#
    -#
  • Listens for verbal commands in the Ruby language!
  • -#
  • Ignores Perl, Java, and all C variants.
  • -#
  • Karate-Chop Action!!!
  • -#
  • Matz signature on left leg.
  • -#
  • Gem studded eyes... Rubies, of course!
  • -#
-# -#

-# Call for a price, today! -#

-# -# -# -# -# -# == Notes -# -# There are a variety of templating solutions available in various Ruby projects. -# For example, RDoc, distributed with Ruby, uses its own template engine, which -# can be reused elsewhere. -# -# Other popular engines could be found in the corresponding -# {Category}[https://www.ruby-toolbox.com/categories/template_engines] of -# The Ruby Toolbox. -# -# source://erb//lib/erb/version.rb#2 -class ERB - # Constructs a new ERB object with the template specified in _str_. - # - # An ERB object works by building a chunk of Ruby code that will output - # the completed template when run. - # - # If _trim_mode_ is passed a String containing one or more of the following - # modifiers, ERB will adjust its code generation as listed: - # - # % enables Ruby code processing for lines beginning with % - # <> omit newline for lines starting with <% and ending in %> - # > omit newline for lines ending in %> - # - omit blank lines ending in -%> - # - # _eoutvar_ can be used to set the name of the variable ERB will build up - # its output in. This is useful when you need to run multiple ERB - # templates through the same binding and/or when you want to control where - # output ends up. Pass the name of the variable to be used inside a String. - # - # === Example - # - # require "erb" - # - # # build data class - # class Listings - # PRODUCT = { :name => "Chicken Fried Steak", - # :desc => "A well messaged pattie, breaded and fried.", - # :cost => 9.95 } - # - # attr_reader :product, :price - # - # def initialize( product = "", price = "" ) - # @product = product - # @price = price - # end - # - # def build - # b = binding - # # create and run templates, filling member data variables - # ERB.new(<<~'END_PRODUCT', trim_mode: "", eoutvar: "@product").result b - # <%= PRODUCT[:name] %> - # <%= PRODUCT[:desc] %> - # END_PRODUCT - # ERB.new(<<~'END_PRICE', trim_mode: "", eoutvar: "@price").result b - # <%= PRODUCT[:name] %> -- <%= PRODUCT[:cost] %> - # <%= PRODUCT[:desc] %> - # END_PRICE - # end - # end - # - # # setup template data - # listings = Listings.new - # listings.build - # - # puts listings.product + "\n" + listings.price - # - # _Generates_ - # - # Chicken Fried Steak - # A well massaged pattie, breaded and fried. - # - # Chicken Fried Steak -- 9.95 - # A well massaged pattie, breaded and fried. - # - # @return [ERB] a new instance of ERB - # - # source://erb//lib/erb.rb#334 - def initialize(str, safe_level = T.unsafe(nil), legacy_trim_mode = T.unsafe(nil), legacy_eoutvar = T.unsafe(nil), trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end - - # Define unnamed class which has _methodname_ as instance method, and return it. - # - # example: - # class MyClass_ - # def initialize(arg1, arg2) - # @arg1 = arg1; @arg2 = arg2 - # end - # end - # filename = 'example.rhtml' # @arg1 and @arg2 are used in example.rhtml - # erb = ERB.new(File.read(filename)) - # erb.filename = filename - # MyClass = erb.def_class(MyClass_, 'render()') - # print MyClass.new('foo', 123).render() - # - # source://erb//lib/erb.rb#499 - def def_class(superklass = T.unsafe(nil), methodname = T.unsafe(nil)); end - - # Define _methodname_ as instance method of _mod_ from compiled Ruby source. - # - # example: - # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml - # erb = ERB.new(File.read(filename)) - # erb.def_method(MyClass, 'render(arg1, arg2)', filename) - # print MyClass.new.render('foo', 123) - # - # source://erb//lib/erb.rb#463 - def def_method(mod, methodname, fname = T.unsafe(nil)); end - - # Create unnamed module, define _methodname_ as instance method of it, and return it. - # - # example: - # filename = 'example.rhtml' # 'arg1' and 'arg2' are used in example.rhtml - # erb = ERB.new(File.read(filename)) - # erb.filename = filename - # MyModule = erb.def_module('render(arg1, arg2)') - # class MyClass - # include MyModule - # end - # - # source://erb//lib/erb.rb#480 - def def_module(methodname = T.unsafe(nil)); end - - # The encoding to eval - # - # source://erb//lib/erb.rb#369 - def encoding; end - - # The optional _filename_ argument passed to Kernel#eval when the ERB code - # is run - # - # source://erb//lib/erb.rb#373 - def filename; end - - # The optional _filename_ argument passed to Kernel#eval when the ERB code - # is run - # - # source://erb//lib/erb.rb#373 - def filename=(_arg0); end - - # The optional _lineno_ argument passed to Kernel#eval when the ERB code - # is run - # - # source://erb//lib/erb.rb#377 - def lineno; end - - # The optional _lineno_ argument passed to Kernel#eval when the ERB code - # is run - # - # source://erb//lib/erb.rb#377 - def lineno=(_arg0); end - - # Sets optional filename and line number that will be used in ERB code - # evaluation and error reporting. See also #filename= and #lineno= - # - # erb = ERB.new('<%= some_x %>') - # erb.render - # # undefined local variable or method `some_x' - # # from (erb):1 - # - # erb.location = ['file.erb', 3] - # # All subsequent error reporting would use new location - # erb.render - # # undefined local variable or method `some_x' - # # from file.erb:4 - # - # source://erb//lib/erb.rb#394 - def location=(_arg0); end - - # Creates a new compiler for ERB. See ERB::Compiler.new for details - # - # source://erb//lib/erb.rb#361 - def make_compiler(trim_mode); end - - # Executes the generated ERB code to produce a completed template, returning - # the results of that code. - # - # _b_ accepts a Binding object which is used to set the context of - # code evaluation. - # - # source://erb//lib/erb.rb#423 - def result(b = T.unsafe(nil)); end - - # Render a template on a new toplevel binding with local variables specified - # by a Hash object. - # - # source://erb//lib/erb.rb#432 - def result_with_hash(hash); end - - # Generate results and print them. (see ERB#result) - # - # source://erb//lib/erb.rb#412 - def run(b = T.unsafe(nil)); end - - # Can be used to set _eoutvar_ as described in ERB::new. It's probably - # easier to just use the constructor though, since calling this method - # requires the setup of an ERB _compiler_ object. - # - # source://erb//lib/erb.rb#404 - def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end - - # The Ruby code generated by ERB - # - # source://erb//lib/erb.rb#366 - def src; end - - private - - # Returns a new binding each time *near* TOPLEVEL_BINDING for runs that do - # not specify a binding. - # - # source://erb//lib/erb.rb#444 - def new_toplevel(vars = T.unsafe(nil)); end - - class << self - # Returns revision information for the erb.rb module. - # - # source://erb//lib/erb.rb#266 - def version; end - end -end - -# -- -# ERB::Compiler -# -# Compiles ERB templates into Ruby code; the compiled code produces the -# template result when evaluated. ERB::Compiler provides hooks to define how -# generated output is handled. -# -# Internally ERB does something like this to generate the code returned by -# ERB#src: -# -# compiler = ERB::Compiler.new('<>') -# compiler.pre_cmd = ["_erbout=+''"] -# compiler.put_cmd = "_erbout.<<" -# compiler.insert_cmd = "_erbout.<<" -# compiler.post_cmd = ["_erbout"] -# -# code, enc = compiler.compile("Got <%= obj %>!\n") -# puts code -# -# Generates: -# -# #coding:UTF-8 -# _erbout=+''; _erbout.<< "Got ".freeze; _erbout.<<(( obj ).to_s); _erbout.<< "!\n".freeze; _erbout -# -# By default the output is sent to the print method. For example: -# -# compiler = ERB::Compiler.new('<>') -# code, enc = compiler.compile("Got <%= obj %>!\n") -# puts code -# -# Generates: -# -# #coding:UTF-8 -# print "Got ".freeze; print(( obj ).to_s); print "!\n".freeze -# -# == Evaluation -# -# The compiled code can be used in any context where the names in the code -# correctly resolve. Using the last example, each of these print 'Got It!' -# -# Evaluate using a variable: -# -# obj = 'It' -# eval code -# -# Evaluate using an input: -# -# mod = Module.new -# mod.module_eval %{ -# def get(obj) -# #{code} -# end -# } -# extend mod -# get('It') -# -# Evaluate using an accessor: -# -# klass = Class.new Object -# klass.class_eval %{ -# attr_accessor :obj -# def initialize(obj) -# @obj = obj -# end -# def get_it -# #{code} -# end -# } -# klass.new('It').get_it -# -# Good! See also ERB#def_method, ERB#def_module, and ERB#def_class. -# -# source://erb//lib/erb/compiler.rb#73 -class ERB::Compiler - # Construct a new compiler using the trim_mode. See ERB::new for available - # trim modes. - # - # @return [Compiler] a new instance of Compiler - # - # source://erb//lib/erb/compiler.rb#433 - def initialize(trim_mode); end - - # source://erb//lib/erb/compiler.rb#315 - def add_insert_cmd(out, content); end - - # source://erb//lib/erb/compiler.rb#311 - def add_put_cmd(out, content); end - - # Compiles an ERB template into Ruby code. Returns an array of the code - # and encoding like ["code", Encoding]. - # - # @raise [ArgumentError] - # - # source://erb//lib/erb/compiler.rb#321 - def compile(s); end - - # source://erb//lib/erb/compiler.rb#381 - def compile_content(stag, out); end - - # source://erb//lib/erb/compiler.rb#368 - def compile_etag(etag, out, scanner); end - - # source://erb//lib/erb/compiler.rb#344 - def compile_stag(stag, out, scanner); end - - # The command to handle text that is inserted prior to a newline - # - # source://erb//lib/erb/compiler.rb#446 - def insert_cmd; end - - # The command to handle text that is inserted prior to a newline - # - # source://erb//lib/erb/compiler.rb#446 - def insert_cmd=(_arg0); end - - # source://erb//lib/erb/compiler.rb#427 - def make_scanner(src); end - - # Returns the value of attribute percent. - # - # source://erb//lib/erb/compiler.rb#440 - def percent; end - - # An array of commands appended to compiled code - # - # source://erb//lib/erb/compiler.rb#452 - def post_cmd; end - - # An array of commands appended to compiled code - # - # source://erb//lib/erb/compiler.rb#452 - def post_cmd=(_arg0); end - - # An array of commands prepended to compiled code - # - # source://erb//lib/erb/compiler.rb#449 - def pre_cmd; end - - # An array of commands prepended to compiled code - # - # source://erb//lib/erb/compiler.rb#449 - def pre_cmd=(_arg0); end - - # source://erb//lib/erb/compiler.rb#398 - def prepare_trim_mode(mode); end - - # The command to handle text that ends with a newline - # - # source://erb//lib/erb/compiler.rb#443 - def put_cmd; end - - # The command to handle text that ends with a newline - # - # source://erb//lib/erb/compiler.rb#443 - def put_cmd=(_arg0); end - - # Returns the value of attribute trim_mode. - # - # source://erb//lib/erb/compiler.rb#440 - def trim_mode; end - - private - - # A buffered text in #compile - # - # source://erb//lib/erb/compiler.rb#457 - def content; end - - # A buffered text in #compile - # - # source://erb//lib/erb/compiler.rb#457 - def content=(_arg0); end - - # source://erb//lib/erb/compiler.rb#459 - def detect_magic_comment(s, enc = T.unsafe(nil)); end - - # :startdoc: - # - # source://erb//lib/erb/compiler.rb#485 - def warn_invalid_trim_mode(mode, uplevel:); end -end - -# source://erb//lib/erb/compiler.rb#278 -class ERB::Compiler::Buffer - # @return [Buffer] a new instance of Buffer - # - # source://erb//lib/erb/compiler.rb#279 - def initialize(compiler, enc = T.unsafe(nil), frozen = T.unsafe(nil)); end - - # source://erb//lib/erb/compiler.rb#301 - def close; end - - # source://erb//lib/erb/compiler.rb#295 - def cr; end - - # source://erb//lib/erb/compiler.rb#291 - def push(cmd); end - - # Returns the value of attribute script. - # - # source://erb//lib/erb/compiler.rb#289 - def script; end -end - -# source://erb//lib/erb/compiler.rb#254 -class ERB::Compiler::ExplicitScanner < ::ERB::Compiler::Scanner - # source://erb//lib/erb/compiler.rb#255 - def scan; end -end - -# source://erb//lib/erb/compiler.rb#74 -class ERB::Compiler::PercentLine - # @return [PercentLine] a new instance of PercentLine - # - # source://erb//lib/erb/compiler.rb#75 - def initialize(str); end - - # Returns the value of attribute value. - # - # source://erb//lib/erb/compiler.rb#79 - def to_s; end - - # Returns the value of attribute value. - # - # source://erb//lib/erb/compiler.rb#78 - def value; end -end - -# source://erb//lib/erb/compiler.rb#82 -class ERB::Compiler::Scanner - # @return [Scanner] a new instance of Scanner - # - # source://erb//lib/erb/compiler.rb#108 - def initialize(src, trim_mode, percent); end - - # Returns the value of attribute etags. - # - # source://erb//lib/erb/compiler.rb#115 - def etags; end - - # source://erb//lib/erb/compiler.rb#117 - def scan; end - - # Returns the value of attribute stag. - # - # source://erb//lib/erb/compiler.rb#114 - def stag; end - - # Sets the attribute stag - # - # @param value the value to set the attribute stag to. - # - # source://erb//lib/erb/compiler.rb#114 - def stag=(_arg0); end - - # Returns the value of attribute stags. - # - # source://erb//lib/erb/compiler.rb#115 - def stags; end - - class << self - # source://erb//lib/erb/compiler.rb#97 - def default_scanner=(klass); end - - # source://erb//lib/erb/compiler.rb#101 - def make_scanner(src, trim_mode, percent); end - - # source://erb//lib/erb/compiler.rb#94 - def regist_scanner(klass, trim_mode, percent); end - - # source://erb//lib/erb/compiler.rb#86 - def register_scanner(klass, trim_mode, percent); end - end -end - -# source://erb//lib/erb/compiler.rb#107 -ERB::Compiler::Scanner::DEFAULT_ETAGS = T.let(T.unsafe(nil), Array) - -# source://erb//lib/erb/compiler.rb#106 -ERB::Compiler::Scanner::DEFAULT_STAGS = T.let(T.unsafe(nil), Array) - -# source://erb//lib/erb/compiler.rb#240 -class ERB::Compiler::SimpleScanner < ::ERB::Compiler::Scanner - # source://erb//lib/erb/compiler.rb#241 - def scan; end -end - -# source://erb//lib/erb/compiler.rb#120 -class ERB::Compiler::TrimScanner < ::ERB::Compiler::Scanner - # @return [TrimScanner] a new instance of TrimScanner - # - # source://erb//lib/erb/compiler.rb#121 - def initialize(src, trim_mode, percent); end - - # source://erb//lib/erb/compiler.rb#210 - def explicit_trim_line(line); end - - # @return [Boolean] - # - # source://erb//lib/erb/compiler.rb#229 - def is_erb_stag?(s); end - - # source://erb//lib/erb/compiler.rb#152 - def percent_line(line, &block); end - - # source://erb//lib/erb/compiler.rb#140 - def scan(&block); end - - # source://erb//lib/erb/compiler.rb#165 - def scan_line(line); end - - # source://erb//lib/erb/compiler.rb#174 - def trim_line1(line); end - - # source://erb//lib/erb/compiler.rb#188 - def trim_line2(line); end -end - -# :stopdoc: -# -# source://erb//lib/erb/compiler.rb#476 -ERB::Compiler::WARNING_UPLEVEL = T.let(T.unsafe(nil), Integer) - -# ERB::DefMethod -# -# Utility module to define eRuby script as instance method. -# -# === Example -# -# example.rhtml: -# <% for item in @items %> -# <%= item %> -# <% end %> -# -# example.rb: -# require 'erb' -# class MyClass -# extend ERB::DefMethod -# def_erb_method('render()', 'example.rhtml') -# def initialize(items) -# @items = items -# end -# end -# print MyClass.new([10,20,30]).render() -# -# result: -# -# 10 -# -# 20 -# -# 30 -# -# source://erb//lib/erb/def_method.rb#33 -module ERB::DefMethod - private - - # define _methodname_ as instance method of current module, using ERB - # object or eRuby file - # - # source://erb//lib/erb/def_method.rb#36 - def def_erb_method(methodname, erb_or_fname); end - - class << self - # define _methodname_ as instance method of current module, using ERB - # object or eRuby file - # - # source://erb//lib/erb/def_method.rb#46 - def def_erb_method(methodname, erb_or_fname); end - end -end - -module ERB::Escape - private - - def html_escape(_arg0); end - - class << self - def html_escape(_arg0); end - end -end - -# source://erb//lib/erb.rb#355 -ERB::NOT_GIVEN = T.let(T.unsafe(nil), Object) - -# ERB::Util -# -# A utility module for conversion routines, often handy in HTML generation. -# -# source://erb//lib/erb/util.rb#32 -module ERB::Util - include ::ERB::Escape - - private - - # source://erb//lib/erb/util.rb#47 - def h(_arg0); end - - # cgi.gem <= v0.3.2 - # - # source://erb//lib/erb/util.rb#73 - def u(s); end - - # cgi.gem <= v0.3.2 - # - # source://erb//lib/erb/util.rb#63 - def url_encode(s); end - - class << self - # source://erb//lib/erb/util.rb#48 - def h(_arg0); end - - # source://erb//lib/erb/util.rb#46 - def html_escape(_arg0); end - - # cgi.gem <= v0.3.2 - # - # source://erb//lib/erb/util.rb#74 - def u(s); end - - # cgi.gem <= v0.3.2 - # - # source://erb//lib/erb/util.rb#75 - def url_encode(s); end - end -end - -# source://erb//lib/erb/version.rb#3 -ERB::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/erb@6.0.2.rbi b/sorbet/rbi/gems/erb@6.0.2.rbi new file mode 100644 index 0000000..4afbf29 --- /dev/null +++ b/sorbet/rbi/gems/erb@6.0.2.rbi @@ -0,0 +1,816 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erb` gem. +# Please instead update this file by running `bin/tapioca gem erb`. + + +# source://erb//lib/erb/version.rb#2 +class ERB + # :markup: markdown + # + # :call-seq: + # ERB.new(template, trim_mode: nil, eoutvar: '_erbout') + # + # Returns a new \ERB object containing the given string +template+. + # + # For details about `template`, its embedded tags, and generated results, see ERB. + # + # **Keyword Argument `trim_mode`** + # + # You can use keyword argument `trim_mode: '%'` + # to enable the [shorthand format][shorthand format] for execution tags. + # + # This value allows [blank line control][blank line control]: + # + # - `'-'`: Omit each blank line ending with `'%>'`. + # + # Other values allow [newline control][newline control]: + # + # - `'>'`: Omit newline for each line ending with `'%>'`. + # - `'<>'`: Omit newline for each line starting with `'<%'` and ending with `'%>'`. + # + # You can also [combine trim modes][combine trim modes]. + # + # **Keyword Argument `eoutvar`** + # + # The string value of keyword argument `eoutvar` specifies the name of the variable + # that method #result uses to construct its result string; + # see #src. + # + # This is useful when you need to run multiple \ERB templates through the same binding + # and/or when you want to control where output ends up. + # + # It's good practice to choose a variable name that begins with an underscore: `'_'`. + # + # [blank line control]: rdoc-ref:ERB@Suppressing+Unwanted+Blank+Lines + # [combine trim modes]: rdoc-ref:ERB@Combining+Trim+Modes + # [newline control]: rdoc-ref:ERB@Suppressing+Unwanted+Newlines + # [shorthand format]: rdoc-ref:ERB@Shorthand+Format+for+Execution+Tags + # + # @return [ERB] a new instance of ERB + # + # source://erb//lib/erb.rb#832 + def initialize(str, trim_mode: T.unsafe(nil), eoutvar: T.unsafe(nil)); end + + # :markup: markdown + # + # :call-seq: + # def_class(super_class = Object, method_name = 'result') -> new_class + # + # Returns a new nameless class whose superclass is `super_class`, + # and which has instance method `method_name`. + # + # Create a template from HTML that has embedded expression tags that use `@arg1` and `@arg2`: + # + # ``` + # html = <