rbs_rails 0.3.0 → 0.4.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.
@@ -193,7 +193,11 @@ module ActionView
193
193
 
194
194
  def <<: (untyped value) -> untyped
195
195
 
196
+ alias append= <<
197
+
196
198
  def safe_expr_append=: (untyped val) -> untyped
199
+
200
+ alias safe_append= safe_concat
197
201
  end
198
202
 
199
203
  class StreamingBuffer
@@ -202,8 +206,14 @@ module ActionView
202
206
 
203
207
  def <<: (untyped value) -> untyped
204
208
 
209
+ alias concat <<
210
+
211
+ alias append= <<
212
+
205
213
  def safe_concat: (untyped value) -> untyped
206
214
 
215
+ alias safe_append= safe_concat
216
+
207
217
  def html_safe?: () -> ::TrueClass
208
218
 
209
219
  def html_safe: () -> untyped
@@ -401,6 +411,8 @@ module ActionView
401
411
 
402
412
  # Called by content_for
403
413
  def append: (untyped key, untyped value) -> untyped
414
+
415
+ alias append! append
404
416
  end
405
417
 
406
418
  class StreamingFlow < OutputFlow
@@ -980,6 +992,8 @@ module ActionView
980
992
  # asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js"
981
993
  def asset_path: (untyped source, ?::Hash[untyped, untyped] options) -> (::String | untyped)
982
994
 
995
+ alias path_to_asset asset_path
996
+
983
997
  # Computes the full URL to an asset in the public directory. This
984
998
  # will use +asset_path+ internally, so most of their behaviors
985
999
  # will be the same. If :host options is set, it overwrites global
@@ -992,6 +1006,8 @@ module ActionView
992
1006
  #
993
1007
  def asset_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
994
1008
 
1009
+ alias url_to_asset asset_url
1010
+
995
1011
  ASSET_EXTENSIONS: ::Hash[untyped, untyped]
996
1012
 
997
1013
  # Compute extname to append to asset path. Returns +nil+ if
@@ -1006,6 +1022,8 @@ module ActionView
1006
1022
  # or generate digested paths or query strings.
1007
1023
  def compute_asset_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1008
1024
 
1025
+ alias public_compute_asset_path compute_asset_path
1026
+
1009
1027
  # Pick an asset host for this source. Returns +nil+ if no host is set,
1010
1028
  # the host if no wildcard is set, the host interpolated with the
1011
1029
  # numbers 0-3 if it contains <tt>%d</tt> (the number is the source hash mod 4),
@@ -1025,6 +1043,8 @@ module ActionView
1025
1043
  # javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js
1026
1044
  def javascript_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1027
1045
 
1046
+ alias path_to_javascript javascript_path
1047
+
1028
1048
  # Computes the full URL to a JavaScript asset in the public javascripts directory.
1029
1049
  # This will use +javascript_path+ internally, so most of their behaviors will be the same.
1030
1050
  # Since +javascript_url+ is based on +asset_url+ method you can set :host options. If :host
@@ -1034,6 +1054,8 @@ module ActionView
1034
1054
  #
1035
1055
  def javascript_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1036
1056
 
1057
+ alias url_to_javascript javascript_url
1058
+
1037
1059
  # Computes the path to a stylesheet asset in the public stylesheets directory.
1038
1060
  # If the +source+ filename has no extension, .css will be appended (except for explicit URIs).
1039
1061
  # Full paths from the document root will be passed through.
@@ -1046,6 +1068,8 @@ module ActionView
1046
1068
  # stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css
1047
1069
  def stylesheet_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1048
1070
 
1071
+ alias path_to_stylesheet stylesheet_path
1072
+
1049
1073
  # Computes the full URL to a stylesheet asset in the public stylesheets directory.
1050
1074
  # This will use +stylesheet_path+ internally, so most of their behaviors will be the same.
1051
1075
  # Since +stylesheet_url+ is based on +asset_url+ method you can set :host options. If :host
@@ -1055,6 +1079,8 @@ module ActionView
1055
1079
  #
1056
1080
  def stylesheet_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1057
1081
 
1082
+ alias url_to_stylesheet stylesheet_url
1083
+
1058
1084
  # Computes the path to an image asset.
1059
1085
  # Full paths from the document root will be passed through.
1060
1086
  # Used internally by +image_tag+ to build the image path:
@@ -1070,6 +1096,8 @@ module ActionView
1070
1096
  # plugin authors are encouraged to do so.
1071
1097
  def image_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1072
1098
 
1099
+ alias path_to_image image_path
1100
+
1073
1101
  # Computes the full URL to an image asset.
1074
1102
  # This will use +image_path+ internally, so most of their behaviors will be the same.
1075
1103
  # Since +image_url+ is based on +asset_url+ method you can set :host options. If :host
@@ -1079,6 +1107,8 @@ module ActionView
1079
1107
  #
1080
1108
  def image_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1081
1109
 
1110
+ alias url_to_image image_url
1111
+
1082
1112
  # Computes the path to a video asset in the public videos directory.
1083
1113
  # Full paths from the document root will be passed through.
1084
1114
  # Used internally by +video_tag+ to build the video path.
@@ -1090,6 +1120,8 @@ module ActionView
1090
1120
  # video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi
1091
1121
  def video_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1092
1122
 
1123
+ alias path_to_video video_path
1124
+
1093
1125
  # Computes the full URL to a video asset in the public videos directory.
1094
1126
  # This will use +video_path+ internally, so most of their behaviors will be the same.
1095
1127
  # Since +video_url+ is based on +asset_url+ method you can set :host options. If :host
@@ -1099,6 +1131,8 @@ module ActionView
1099
1131
  #
1100
1132
  def video_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1101
1133
 
1134
+ alias url_to_video video_url
1135
+
1102
1136
  # Computes the path to an audio asset in the public audios directory.
1103
1137
  # Full paths from the document root will be passed through.
1104
1138
  # Used internally by +audio_tag+ to build the audio path.
@@ -1110,6 +1144,8 @@ module ActionView
1110
1144
  # audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav
1111
1145
  def audio_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1112
1146
 
1147
+ alias path_to_audio audio_path
1148
+
1113
1149
  # Computes the full URL to an audio asset in the public audios directory.
1114
1150
  # This will use +audio_path+ internally, so most of their behaviors will be the same.
1115
1151
  # Since +audio_url+ is based on +asset_url+ method you can set :host options. If :host
@@ -1119,6 +1155,8 @@ module ActionView
1119
1155
  #
1120
1156
  def audio_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1121
1157
 
1158
+ alias url_to_audio audio_url
1159
+
1122
1160
  # Computes the path to a font asset.
1123
1161
  # Full paths from the document root will be passed through.
1124
1162
  #
@@ -1129,6 +1167,8 @@ module ActionView
1129
1167
  # font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf
1130
1168
  def font_path: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1131
1169
 
1170
+ alias path_to_font font_path
1171
+
1132
1172
  # Computes the full URL to a font asset.
1133
1173
  # This will use +font_path+ internally, so most of their behaviors will be the same.
1134
1174
  # Since +font_url+ is based on +asset_url+ method you can set :host options. If :host
@@ -1137,6 +1177,8 @@ module ActionView
1137
1177
  # font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf
1138
1178
  #
1139
1179
  def font_url: (untyped source, ?::Hash[untyped, untyped] options) -> untyped
1180
+
1181
+ alias url_to_font font_url
1140
1182
  end
1141
1183
  end
1142
1184
  end
@@ -1711,6 +1753,9 @@ module ActionView
1711
1753
  # "X-CSRF-Token" HTTP header. If you are using rails-ujs this happens automatically.
1712
1754
  #
1713
1755
  def csrf_meta_tags: () -> untyped
1756
+
1757
+ # For backwards compatibility.
1758
+ alias csrf_meta_tag csrf_meta_tags
1714
1759
  end
1715
1760
  end
1716
1761
  end
@@ -1822,6 +1867,8 @@ module ActionView
1822
1867
  #
1823
1868
  def time_ago_in_words: (untyped from_time, ?::Hash[untyped, untyped] options) -> untyped
1824
1869
 
1870
+ alias distance_of_time_in_words_to_now time_ago_in_words
1871
+
1825
1872
  # Returns a set of select tags (one for year, month, and day) pre-selected for accessing a specified date-based
1826
1873
  # attribute (identified by +method+) on an object assigned to the template (identified by +object+).
1827
1874
  #
@@ -3771,6 +3818,9 @@ module ActionView
3771
3818
  #
3772
3819
  def telephone_field: (untyped object_name, untyped method, ?::Hash[untyped, untyped] options) -> untyped
3773
3820
 
3821
+ # aliases telephone_field
3822
+ alias phone_field telephone_field
3823
+
3774
3824
  # Returns a text_field of type "date".
3775
3825
  #
3776
3826
  # date_field("user", "born_on")
@@ -3853,6 +3903,8 @@ module ActionView
3853
3903
  #
3854
3904
  def datetime_field: (untyped object_name, untyped method, ?::Hash[untyped, untyped] options) -> untyped
3855
3905
 
3906
+ alias datetime_local_field datetime_field
3907
+
3856
3908
  # Returns a text_field of type "month".
3857
3909
  #
3858
3910
  # month_field("user", "born_on")
@@ -3977,6 +4029,8 @@ module ActionView
3977
4029
 
3978
4030
  attr_reader index: untyped
3979
4031
 
4032
+ alias multipart? multipart
4033
+
3980
4034
  def multipart=: (untyped multipart) -> untyped
3981
4035
 
3982
4036
  def self._to_partial_path: () -> untyped
@@ -5789,6 +5843,8 @@ module ActionView
5789
5843
  # # => <input disabled="disabled" class="special_input" id="tel" name="tel" type="tel" value="0123456789" />
5790
5844
  def telephone_field_tag: (untyped name, ?untyped? value, ?::Hash[untyped, untyped] options) -> untyped
5791
5845
 
5846
+ alias phone_field_tag telephone_field_tag
5847
+
5792
5848
  # Creates a text field of type "date".
5793
5849
  #
5794
5850
  # ==== Options
@@ -5826,6 +5882,8 @@ module ActionView
5826
5882
  # * Otherwise accepts the same options as text_field_tag.
5827
5883
  def datetime_field_tag: (untyped name, ?untyped? value, ?::Hash[untyped, untyped] options) -> untyped
5828
5884
 
5885
+ alias datetime_local_field_tag datetime_field_tag
5886
+
5829
5887
  # Creates a text field of type "month".
5830
5888
  #
5831
5889
  # === Options
@@ -5967,6 +6025,8 @@ module ActionView
5967
6025
  # $('some_element').replaceWith('<%= j render 'some/element_template' %>');
5968
6026
  def escape_javascript: (untyped javascript) -> untyped
5969
6027
 
6028
+ alias j escape_javascript
6029
+
5970
6030
  # Returns a JavaScript tag with the +content+ inside. Example:
5971
6031
  # javascript_tag "alert('All is good')"
5972
6032
  #
@@ -6445,66 +6505,6 @@ module ActionView
6445
6505
  end
6446
6506
  end
6447
6507
 
6448
- module ActionView
6449
- module Helpers
6450
- # nodoc:
6451
- # nodoc:
6452
- extend ActiveSupport::Autoload
6453
-
6454
- def self.eager_load!: () -> untyped
6455
-
6456
- extend ActiveSupport::Concern
6457
-
6458
- include ActiveSupport::Benchmarkable
6459
-
6460
- include ActiveModelHelper
6461
-
6462
- include AssetTagHelper
6463
-
6464
- include AssetUrlHelper
6465
-
6466
- include AtomFeedHelper
6467
-
6468
- include CacheHelper
6469
-
6470
- include CaptureHelper
6471
-
6472
- include ControllerHelper
6473
-
6474
- include CspHelper
6475
-
6476
- include CsrfHelper
6477
-
6478
- include DateHelper
6479
-
6480
- include DebugHelper
6481
-
6482
- include FormHelper
6483
-
6484
- include FormOptionsHelper
6485
-
6486
- include FormTagHelper
6487
-
6488
- include JavaScriptHelper
6489
-
6490
- include NumberHelper
6491
-
6492
- include OutputSafetyHelper
6493
-
6494
- include RenderingHelper
6495
-
6496
- include SanitizeHelper
6497
-
6498
- include TagHelper
6499
-
6500
- include TextHelper
6501
-
6502
- include TranslationHelper
6503
-
6504
- include UrlHelper
6505
- end
6506
- end
6507
-
6508
6508
  module ActionView
6509
6509
  module Helpers
6510
6510
  # nodoc:
@@ -7031,18 +7031,6 @@ module ActionView
7031
7031
  end
7032
7032
  end
7033
7033
 
7034
- module ActionView
7035
- module Helpers
7036
- module Tags
7037
- module Checkable
7038
- # :nodoc:
7039
- # :nodoc:
7040
- def input_checked?: (untyped options) -> untyped
7041
- end
7042
- end
7043
- end
7044
- end
7045
-
7046
7034
  module ActionView
7047
7035
  module Helpers
7048
7036
  module Tags
@@ -7063,6 +7051,18 @@ module ActionView
7063
7051
  end
7064
7052
  end
7065
7053
 
7054
+ module ActionView
7055
+ module Helpers
7056
+ module Tags
7057
+ module Checkable
7058
+ # :nodoc:
7059
+ # :nodoc:
7060
+ def input_checked?: (untyped options) -> untyped
7061
+ end
7062
+ end
7063
+ end
7064
+ end
7065
+
7066
7066
  module ActionView
7067
7067
  module Helpers
7068
7068
  module Tags
@@ -7390,16 +7390,6 @@ module ActionView
7390
7390
  end
7391
7391
  end
7392
7392
 
7393
- module ActionView
7394
- module Helpers
7395
- module Tags
7396
- # nodoc:
7397
- # nodoc:
7398
- extend ActiveSupport::Autoload
7399
- end
7400
- end
7401
- end
7402
-
7403
7393
  module ActionView
7404
7394
  module Helpers
7405
7395
  module Tags
@@ -7551,6 +7541,16 @@ module ActionView
7551
7541
  end
7552
7542
  end
7553
7543
 
7544
+ module ActionView
7545
+ module Helpers
7546
+ module Tags
7547
+ # nodoc:
7548
+ # nodoc:
7549
+ extend ActiveSupport::Autoload
7550
+ end
7551
+ end
7552
+ end
7553
+
7554
7554
  module ActionView
7555
7555
  module Helpers
7556
7556
  # = Action View Text Helpers
@@ -7939,12 +7939,16 @@ module ActionView
7939
7939
  # they can provide HTML values for.
7940
7940
  def translate: (untyped key, **untyped options) -> untyped
7941
7941
 
7942
+ alias t translate
7943
+
7942
7944
  # Delegates to <tt>I18n.localize</tt> with no additional functionality.
7943
7945
  #
7944
7946
  # See https://www.rubydoc.info/github/svenfuchs/i18n/master/I18n/Backend/Base:localize
7945
7947
  # for more information.
7946
7948
  def localize: (untyped object, **untyped options) -> untyped
7947
7949
 
7950
+ alias l localize
7951
+
7948
7952
  def scope_key_by_partial: (untyped key) -> untyped
7949
7953
 
7950
7954
  def html_safe_translation_key?: (untyped key) -> untyped
@@ -8419,6 +8423,66 @@ module ActionView
8419
8423
  end
8420
8424
  end
8421
8425
 
8426
+ module ActionView
8427
+ module Helpers
8428
+ # nodoc:
8429
+ # nodoc:
8430
+ extend ActiveSupport::Autoload
8431
+
8432
+ def self.eager_load!: () -> untyped
8433
+
8434
+ extend ActiveSupport::Concern
8435
+
8436
+ include ActiveSupport::Benchmarkable
8437
+
8438
+ include ActiveModelHelper
8439
+
8440
+ include AssetTagHelper
8441
+
8442
+ include AssetUrlHelper
8443
+
8444
+ include AtomFeedHelper
8445
+
8446
+ include CacheHelper
8447
+
8448
+ include CaptureHelper
8449
+
8450
+ include ControllerHelper
8451
+
8452
+ include CspHelper
8453
+
8454
+ include CsrfHelper
8455
+
8456
+ include DateHelper
8457
+
8458
+ include DebugHelper
8459
+
8460
+ include FormHelper
8461
+
8462
+ include FormOptionsHelper
8463
+
8464
+ include FormTagHelper
8465
+
8466
+ include JavaScriptHelper
8467
+
8468
+ include NumberHelper
8469
+
8470
+ include OutputSafetyHelper
8471
+
8472
+ include RenderingHelper
8473
+
8474
+ include SanitizeHelper
8475
+
8476
+ include TagHelper
8477
+
8478
+ include TextHelper
8479
+
8480
+ include TranslationHelper
8481
+
8482
+ include UrlHelper
8483
+ end
8484
+ end
8485
+
8422
8486
  module ActionView
8423
8487
  # Layouts reverse the common pattern of including shared headers and footers in many templates to isolate changes in
8424
8488
  # repeated setups. The inclusion pattern has pages that look like this:
@@ -8771,6 +8835,9 @@ module ActionView
8771
8835
  end
8772
8836
 
8773
8837
  class DetailsKey
8838
+ # nodoc:
8839
+ alias eql? equal?
8840
+
8774
8841
  def self.digest_cache: (untyped details) -> untyped
8775
8842
 
8776
8843
  def self.details_cache_key: (untyped details) -> untyped
@@ -8802,12 +8869,20 @@ module ActionView
8802
8869
 
8803
8870
  def find: (untyped name, ?untyped prefixes, ?bool partial, ?untyped keys, ?::Hash[untyped, untyped] options) -> untyped
8804
8871
 
8872
+ alias find_template find
8873
+
8874
+ alias find_file find
8875
+
8805
8876
  def find_all: (untyped name, ?untyped prefixes, ?bool partial, ?untyped keys, ?::Hash[untyped, untyped] options) -> untyped
8806
8877
 
8807
8878
  def exists?: (untyped name, ?untyped prefixes, ?bool partial, ?untyped keys, **untyped options) -> untyped
8808
8879
 
8880
+ alias template_exists? exists?
8881
+
8809
8882
  def any?: (untyped name, ?untyped prefixes, ?bool partial) -> untyped
8810
8883
 
8884
+ alias any_templates? any?
8885
+
8811
8886
  # Adds fallbacks to the view paths. Useful in cases when you are rendering
8812
8887
  # a :file.
8813
8888
  def with_fallbacks: () { () -> untyped } -> untyped
@@ -8895,6 +8970,8 @@ module ActionView
8895
8970
 
8896
8971
  def find: (*untyped args) -> untyped
8897
8972
 
8973
+ alias find_file find
8974
+
8898
8975
  def find_all: (untyped path, ?untyped prefixes, *untyped args) -> untyped
8899
8976
 
8900
8977
  def exists?: (untyped path, untyped prefixes, *untyped args) -> untyped
@@ -8915,14 +8992,6 @@ module ActionView
8915
8992
  end
8916
8993
  end
8917
8994
 
8918
- module ActionView
8919
- extend ActiveSupport::Autoload
8920
-
8921
- ENCODING_FLAG: ::String
8922
-
8923
- def self.eager_load!: () -> untyped
8924
- end
8925
-
8926
8995
  module ActionView
8927
8996
  # RecordIdentifier encapsulates methods used by various ActionView helpers
8928
8997
  # to associate records with DOM elements.
@@ -9862,6 +9931,8 @@ module ActionView
9862
9931
 
9863
9932
  def identifier: () -> "html template"
9864
9933
 
9934
+ alias inspect identifier
9935
+
9865
9936
  def to_str: () -> untyped
9866
9937
 
9867
9938
  def render: (*untyped args) -> untyped
@@ -9909,129 +9980,6 @@ module ActionView
9909
9980
  end
9910
9981
  end
9911
9982
 
9912
- module ActionView
9913
- # = Action View Template
9914
- class Template
9915
- extend ActiveSupport::Autoload
9916
-
9917
- def self.finalize_compiled_template_methods: () -> untyped
9918
-
9919
- def self.finalize_compiled_template_methods=: (untyped _) -> untyped
9920
-
9921
- extend Template::Handlers
9922
-
9923
- attr_reader identifier: untyped
9924
-
9925
- attr_reader handler: untyped
9926
-
9927
- attr_reader original_encoding: untyped
9928
-
9929
- attr_reader updated_at: untyped
9930
-
9931
- attr_reader variable: untyped
9932
-
9933
- attr_reader format: untyped
9934
-
9935
- attr_reader variant: untyped
9936
-
9937
- attr_reader locals: untyped
9938
-
9939
- attr_reader virtual_path: untyped
9940
-
9941
- def initialize: (untyped source, untyped identifier, untyped handler, ?format: untyped? format, ?variant: untyped? variant, ?locals: untyped? locals, ?virtual_path: untyped? virtual_path, ?updated_at: untyped? updated_at) -> untyped
9942
-
9943
- def virtual_path=: (untyped _) -> nil
9944
-
9945
- def locals=: (untyped _) -> nil
9946
-
9947
- def formats=: (untyped _) -> nil
9948
-
9949
- def formats: () -> untyped
9950
-
9951
- def variants=: (untyped _) -> nil
9952
-
9953
- def variants: () -> ::Array[untyped]
9954
-
9955
- def refresh: (untyped _) -> untyped
9956
-
9957
- # Returns whether the underlying handler supports streaming. If so,
9958
- # a streaming buffer *may* be passed when it starts rendering.
9959
- def supports_streaming?: () -> untyped
9960
-
9961
- # Render a template. If the template was not compiled yet, it is done
9962
- # exactly before rendering.
9963
- #
9964
- # This method is instrumented as "!render_template.action_view". Notice that
9965
- # we use a bang in this instrumentation because you don't want to
9966
- # consume this in production. This is only slow if it's being listened to.
9967
- def render: (untyped view, untyped locals, ?untyped buffer) { () -> untyped } -> untyped
9968
-
9969
- def `type`: () -> untyped
9970
-
9971
- def short_identifier: () -> untyped
9972
-
9973
- def inspect: () -> ::String
9974
-
9975
- def source: () -> untyped
9976
-
9977
- # This method is responsible for properly setting the encoding of the
9978
- # source. Until this point, we assume that the source is BINARY data.
9979
- # If no additional information is supplied, we assume the encoding is
9980
- # the same as <tt>Encoding.default_external</tt>.
9981
- #
9982
- # The user can also specify the encoding via a comment on the first
9983
- # line of the template (# encoding: NAME-OF-ENCODING). This will work
9984
- # with any template engine, as we process out the encoding comment
9985
- # before passing the source on to the template engine, leaving a
9986
- # blank line in its stead.
9987
- def encode!: () -> untyped
9988
-
9989
- def marshal_dump: () -> ::Array[untyped]
9990
-
9991
- def marshal_load: (untyped array) -> untyped
9992
-
9993
- # Compile a template. This method ensures a template is compiled
9994
- # just once and removes the source after it is compiled.
9995
- def compile!: (untyped view) -> (nil | untyped)
9996
-
9997
- # Note: It inherits unnamed class, but omitted
9998
- class LegacyTemplate
9999
- # :nodoc:
10000
- attr_reader source: untyped
10001
-
10002
- def initialize: (untyped template, untyped source) -> untyped
10003
- end
10004
-
10005
- # Among other things, this method is responsible for properly setting
10006
- # the encoding of the compiled template.
10007
- #
10008
- # If the template engine handles encodings, we send the encoded
10009
- # String to the engine without further processing. This allows
10010
- # the template engine to support additional mechanisms for
10011
- # specifying the encoding. For instance, ERB supports <%# encoding: %>
10012
- #
10013
- # Otherwise, after we figure out the correct encoding, we then
10014
- # encode the source into <tt>Encoding.default_internal</tt>.
10015
- # In general, this means that templates will be UTF-8 inside of Rails,
10016
- # regardless of the original source encoding.
10017
- def compile: (untyped mod) -> untyped
10018
-
10019
- def handle_render_error: (untyped view, untyped e) -> untyped
10020
-
10021
- def locals_code: () -> untyped
10022
-
10023
- def method_name: () -> untyped
10024
-
10025
- def identifier_method_name: () -> untyped
10026
-
10027
- def instrument: (untyped action) { () -> untyped } -> untyped
10028
-
10029
- def instrument_render_template: () { () -> untyped } -> untyped
10030
-
10031
- def instrument_payload: () -> { virtual_path: untyped, identifier: untyped }
10032
- end
10033
- end
10034
-
10035
9983
  module ActionView
10036
9984
  # = Action View Resolver
10037
9985
  class Resolver
@@ -10045,11 +9993,15 @@ module ActionView
10045
9993
 
10046
9994
  attr_reader virtual: untyped
10047
9995
 
9996
+ alias partial? partial
9997
+
10048
9998
  def self.build: (untyped name, untyped prefix, untyped partial) -> untyped
10049
9999
 
10050
10000
  def initialize: (untyped name, untyped prefix, untyped partial, untyped virtual) -> untyped
10051
10001
 
10052
10002
  def to_str: () -> untyped
10003
+
10004
+ alias to_s to_str
10053
10005
  end
10054
10006
 
10055
10007
  class Cache
@@ -10087,6 +10039,8 @@ module ActionView
10087
10039
  def canonical_no_templates: (untyped templates) -> untyped
10088
10040
  end
10089
10041
 
10042
+ alias self.caching? self.caching
10043
+
10090
10044
  def initialize: () -> untyped
10091
10045
 
10092
10046
  def clear_cache: () -> untyped
@@ -10094,6 +10048,8 @@ module ActionView
10094
10048
  # Normalizes the arguments and passes it on to find_templates.
10095
10049
  def find_all: (untyped name, ?untyped? prefix, ?bool partial, ?::Hash[untyped, untyped] details, ?untyped? key, ?untyped locals) -> untyped
10096
10050
 
10051
+ alias find_all_anywhere find_all
10052
+
10097
10053
  def find_all_with_query: (untyped query) -> untyped
10098
10054
 
10099
10055
  def _find_all: (untyped name, untyped prefix, untyped partial, untyped details, untyped key, untyped locals) -> untyped
@@ -10154,7 +10110,11 @@ module ActionView
10154
10110
 
10155
10111
  def to_s: () -> untyped
10156
10112
 
10113
+ alias to_path to_s
10114
+
10157
10115
  def eql?: (untyped resolver) -> untyped
10116
+
10117
+ alias == eql?
10158
10118
  end
10159
10119
 
10160
10120
  class OptimizedFileSystemResolver < FileSystemResolver
@@ -10209,6 +10169,8 @@ module ActionView
10209
10169
 
10210
10170
  def identifier: () -> "text template"
10211
10171
 
10172
+ alias inspect identifier
10173
+
10212
10174
  def to_str: () -> untyped
10213
10175
 
10214
10176
  def render: (*untyped args) -> untyped
@@ -10235,8 +10197,12 @@ module ActionView
10235
10197
 
10236
10198
  def to_s: () -> untyped
10237
10199
 
10200
+ alias to_str to_s
10201
+
10238
10202
  def ref: () -> untyped
10239
10203
 
10204
+ alias to_sym ref
10205
+
10240
10206
  def ==: (untyped `type`) -> untyped
10241
10207
  end
10242
10208
 
@@ -10249,6 +10215,128 @@ module ActionView
10249
10215
  end
10250
10216
  end
10251
10217
 
10218
+ module ActionView
10219
+ # = Action View Template
10220
+ class Template
10221
+ extend ActiveSupport::Autoload
10222
+
10223
+ def self.finalize_compiled_template_methods: () -> untyped
10224
+
10225
+ def self.finalize_compiled_template_methods=: (untyped _) -> untyped
10226
+
10227
+ extend Template::Handlers
10228
+
10229
+ attr_reader identifier: untyped
10230
+
10231
+ attr_reader handler: untyped
10232
+
10233
+ attr_reader original_encoding: untyped
10234
+
10235
+ attr_reader updated_at: untyped
10236
+
10237
+ attr_reader variable: untyped
10238
+
10239
+ attr_reader format: untyped
10240
+
10241
+ attr_reader variant: untyped
10242
+
10243
+ attr_reader locals: untyped
10244
+
10245
+ attr_reader virtual_path: untyped
10246
+
10247
+ def initialize: (untyped source, untyped identifier, untyped handler, ?format: untyped? format, ?variant: untyped? variant, ?locals: untyped? locals, ?virtual_path: untyped? virtual_path, ?updated_at: untyped? updated_at) -> untyped
10248
+
10249
+ def virtual_path=: (untyped _) -> nil
10250
+
10251
+ def locals=: (untyped _) -> nil
10252
+
10253
+ def formats=: (untyped _) -> nil
10254
+
10255
+ def formats: () -> untyped
10256
+
10257
+ def variants=: (untyped _) -> nil
10258
+
10259
+ def variants: () -> ::Array[untyped]
10260
+
10261
+ def refresh: (untyped _) -> untyped
10262
+
10263
+ # Returns whether the underlying handler supports streaming. If so,
10264
+ # a streaming buffer *may* be passed when it starts rendering.
10265
+ def supports_streaming?: () -> untyped
10266
+
10267
+ # Render a template. If the template was not compiled yet, it is done
10268
+ # exactly before rendering.
10269
+ #
10270
+ # This method is instrumented as "!render_template.action_view". Notice that
10271
+ # we use a bang in this instrumentation because you don't want to
10272
+ # consume this in production. This is only slow if it's being listened to.
10273
+ def render: (untyped view, untyped locals, ?untyped buffer) { () -> untyped } -> untyped
10274
+
10275
+ def `type`: () -> untyped
10276
+
10277
+ def short_identifier: () -> untyped
10278
+
10279
+ def inspect: () -> ::String
10280
+
10281
+ def source: () -> untyped
10282
+
10283
+ # This method is responsible for properly setting the encoding of the
10284
+ # source. Until this point, we assume that the source is BINARY data.
10285
+ # If no additional information is supplied, we assume the encoding is
10286
+ # the same as <tt>Encoding.default_external</tt>.
10287
+ #
10288
+ # The user can also specify the encoding via a comment on the first
10289
+ # line of the template (# encoding: NAME-OF-ENCODING). This will work
10290
+ # with any template engine, as we process out the encoding comment
10291
+ # before passing the source on to the template engine, leaving a
10292
+ # blank line in its stead.
10293
+ def encode!: () -> untyped
10294
+
10295
+ def marshal_dump: () -> ::Array[untyped]
10296
+
10297
+ def marshal_load: (untyped array) -> untyped
10298
+
10299
+ # Compile a template. This method ensures a template is compiled
10300
+ # just once and removes the source after it is compiled.
10301
+ def compile!: (untyped view) -> (nil | untyped)
10302
+
10303
+ class LegacyTemplate
10304
+ # :nodoc:
10305
+ attr_reader source: untyped
10306
+
10307
+ def initialize: (untyped template, untyped source) -> untyped
10308
+ end
10309
+
10310
+ # Among other things, this method is responsible for properly setting
10311
+ # the encoding of the compiled template.
10312
+ #
10313
+ # If the template engine handles encodings, we send the encoded
10314
+ # String to the engine without further processing. This allows
10315
+ # the template engine to support additional mechanisms for
10316
+ # specifying the encoding. For instance, ERB supports <%# encoding: %>
10317
+ #
10318
+ # Otherwise, after we figure out the correct encoding, we then
10319
+ # encode the source into <tt>Encoding.default_internal</tt>.
10320
+ # In general, this means that templates will be UTF-8 inside of Rails,
10321
+ # regardless of the original source encoding.
10322
+ def compile: (untyped mod) -> untyped
10323
+
10324
+ def handle_render_error: (untyped view, untyped e) -> untyped
10325
+
10326
+ def locals_code: () -> untyped
10327
+
10328
+ def method_name: () -> untyped
10329
+
10330
+ def identifier_method_name: () -> untyped
10331
+
10332
+ def instrument: (untyped action) { () -> untyped } -> untyped
10333
+
10334
+ def instrument_render_template: () { () -> untyped } -> untyped
10335
+
10336
+ def instrument_payload: () -> { virtual_path: untyped, identifier: untyped }
10337
+ end
10338
+ end
10339
+
10252
10340
  module ActionView
10253
10341
  # = Action View Test Case
10254
10342
  class TestCase < ActiveSupport::TestCase
@@ -10285,6 +10373,8 @@ module ActionView
10285
10373
 
10286
10374
  include AbstractController::Helpers
10287
10375
 
10376
+ extend ::AbstractController::Helpers::ClassMethods
10377
+
10288
10378
  include ActionView::Helpers
10289
10379
 
10290
10380
  include ActionView::RecordIdentifier
@@ -10356,6 +10446,8 @@ module ActionView
10356
10446
  # The instance of ActionView::Base that is used by +render+.
10357
10447
  def view: () -> untyped
10358
10448
 
10449
+ alias _view view
10450
+
10359
10451
  INTERNAL_IVARS: ::Array[untyped]
10360
10452
 
10361
10453
  def _user_defined_ivars: () -> untyped
@@ -10489,3 +10581,11 @@ module ActionView
10489
10581
  end
10490
10582
  end
10491
10583
  end
10584
+
10585
+ module ActionView
10586
+ extend ActiveSupport::Autoload
10587
+
10588
+ ENCODING_FLAG: ::String
10589
+
10590
+ def self.eager_load!: () -> untyped
10591
+ end