shotgrid_api_ruby 0.2.0.4 → 0.2.0.6
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.
- checksums.yaml +4 -4
- data/.github/workflows/test_and_publish.yml +3 -3
- data/.github/workflows/test_only.yml +7 -5
- data/.ruby-version +1 -1
- data/CHANGELOG.md +54 -2
- data/Gemfile +12 -0
- data/Gemfile.lock +108 -93
- data/bin/prettirun +1 -1
- data/docs/ShotgridApiRuby/Auth/Validator.html +4 -4
- data/docs/ShotgridApiRuby/Auth.html +4 -4
- data/docs/ShotgridApiRuby/Client.html +4 -4
- data/docs/ShotgridApiRuby/Entities/Params/TooComplexFiltersError.html +4 -4
- data/docs/ShotgridApiRuby/Entities/Params.html +41 -41
- data/docs/ShotgridApiRuby/Entities/Schema.html +4 -4
- data/docs/ShotgridApiRuby/Entities/Summarize/Summary.html +8 -8
- data/docs/ShotgridApiRuby/Entities/Summarize.html +9 -9
- data/docs/ShotgridApiRuby/Entities.html +27 -27
- data/docs/ShotgridApiRuby/Entity.html +12 -12
- data/docs/ShotgridApiRuby/Preferences.html +4 -4
- data/docs/ShotgridApiRuby/ServerInfo.html +4 -4
- data/docs/ShotgridApiRuby/ShotgridCallError.html +4 -4
- data/docs/ShotgridApiRuby/Types.html +4 -4
- data/docs/ShotgridApiRuby.html +5 -5
- data/docs/_index.html +5 -5
- data/docs/file.README.html +4 -4
- data/docs/frames.html +1 -1
- data/docs/index.html +4 -4
- data/docs/top-level-namespace.html +4 -4
- data/lib/shotgrid_api_ruby/entities/params.rb +15 -18
- data/lib/shotgrid_api_ruby/entities/summarize.rb +4 -4
- data/lib/shotgrid_api_ruby/entities.rb +23 -23
- data/lib/shotgrid_api_ruby/version.rb +1 -1
- data/shotgrid_api_ruby.gemspec +3 -12
- data/sorbet/rbi/gems/activesupport@7.0.4.2.rbi +18676 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +533 -3
- data/sorbet/rbi/gems/backport@1.2.0.rbi +518 -4
- data/sorbet/rbi/gems/benchmark@0.2.1.rbi +588 -0
- data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +308 -0
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +2065 -28
- data/sorbet/rbi/gems/childprocess@4.1.0.rbi +397 -4
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +2425 -4
- data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +11570 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +335 -13
- data/sorbet/rbi/gems/dotenv@2.8.1.rbi +234 -0
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +4 -4
- data/sorbet/rbi/gems/faker@3.1.0.rbi +13380 -0
- data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +167 -11
- data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +94 -11
- data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +105 -11
- data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +118 -11
- data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +273 -0
- data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +106 -11
- data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +92 -11
- data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +97 -11
- data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +106 -11
- data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +227 -0
- data/sorbet/rbi/gems/faraday@1.10.3.rbi +2743 -0
- data/sorbet/rbi/gems/ffi@1.15.5.rbi +8 -0
- data/sorbet/rbi/gems/formatador@1.1.0.rbi +8 -0
- data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +62 -4
- data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +558 -4
- data/sorbet/rbi/gems/guard@2.18.0.rbi +4 -4
- data/sorbet/rbi/gems/haml@6.1.1.rbi +1588 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/iniparse@1.5.0.rbi +893 -4
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +15 -4
- data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +129 -4
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3271 -0
- data/sorbet/rbi/gems/listen@3.8.0.rbi +1181 -0
- data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +4 -4
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +202 -2
- data/sorbet/rbi/gems/minitest@5.17.0.rbi +1457 -0
- data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +233 -0
- data/sorbet/rbi/gems/nenv@0.3.0.rbi +4 -4
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +7250 -0
- data/sorbet/rbi/gems/notiffany@0.1.3.rbi +4 -4
- data/sorbet/rbi/gems/overcommit@0.60.0.rbi +2399 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/parser@3.2.0.0.rbi +6964 -0
- data/sorbet/rbi/gems/prettier@3.2.2.rbi +22 -0
- data/sorbet/rbi/gems/prettier_print@1.2.0.rbi +8 -0
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +1171 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
- data/sorbet/rbi/gems/racc@1.6.2.rbi +154 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +408 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2248 -13
- data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +8 -0
- data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +4 -4
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/rbs@2.8.4.rbi +8 -0
- data/sorbet/rbi/gems/regexp_parser@2.6.2.rbi +3481 -0
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +389 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +4048 -3
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10809 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +8109 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +5308 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1620 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +91 -0
- data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +387 -15
- data/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi +7019 -0
- data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +102 -4
- data/sorbet/rbi/gems/rubocop-performance@1.15.2.rbi +3021 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +990 -0
- data/sorbet/rbi/gems/rubocop@1.44.1.rbi +54394 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1235 -4
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +4 -4
- data/sorbet/rbi/gems/shellany@0.0.1.rbi +4 -4
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +135 -5
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/solargraph@0.48.0.rbi +9146 -0
- data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
- data/sorbet/rbi/gems/syntax_tree-haml@3.0.0.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree-rbs@0.5.1.rbi +8 -0
- data/sorbet/rbi/gems/syntax_tree@5.2.0.rbi +8 -0
- data/sorbet/rbi/gems/tapioca@0.10.5.rbi +3226 -0
- data/sorbet/rbi/gems/temple@0.10.0.rbi +1722 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/tilt@2.0.11.rbi +745 -0
- data/sorbet/rbi/gems/timecop@0.9.6.rbi +368 -0
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +5914 -0
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
- data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
- data/sorbet/rbi/gems/vcr@6.1.0.rbi +3020 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17863 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.6.rbi +950 -0
- data/yarn.lock +3 -3
- metadata +71 -190
- data/sorbet/rbi/gems/activesupport@6.1.4.1.rbi +0 -3770
- data/sorbet/rbi/gems/benchmark@0.1.1.rbi +0 -65
- data/sorbet/rbi/gems/bundler-audit@0.8.0.rbi +0 -8
- data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -39
- data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -8
- data/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi +0 -2403
- data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +0 -8
- data/sorbet/rbi/gems/dotenv@2.7.6.rbi +0 -88
- data/sorbet/rbi/gems/faker@2.19.0.rbi +0 -2513
- data/sorbet/rbi/gems/faraday@1.7.0.rbi +0 -783
- data/sorbet/rbi/gems/ffi@1.15.3.rbi +0 -8
- data/sorbet/rbi/gems/formatador@0.3.0.rbi +0 -8
- data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -8
- data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -584
- data/sorbet/rbi/gems/kramdown@2.3.1.rbi +0 -8
- data/sorbet/rbi/gems/listen@3.7.0.rbi +0 -476
- data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -344
- data/sorbet/rbi/gems/multipart-post@2.1.1.rbi +0 -69
- data/sorbet/rbi/gems/nokogiri@1.12.3.rbi +0 -8
- data/sorbet/rbi/gems/overcommit@0.58.0.rbi +0 -8
- data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -8
- data/sorbet/rbi/gems/parlour@6.0.1.rbi +0 -1610
- data/sorbet/rbi/gems/parser@3.0.2.0.rbi +0 -1731
- data/sorbet/rbi/gems/prettier@1.6.1.rbi +0 -8
- data/sorbet/rbi/gems/pry-byebug@3.9.0.rbi +0 -461
- data/sorbet/rbi/gems/pry@0.13.1.rbi +0 -2553
- data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -47
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -153
- data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +0 -8
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -8
- data/sorbet/rbi/gems/reverse_markdown@2.0.0.rbi +0 -8
- data/sorbet/rbi/gems/rspec-core@3.10.1.rbi +0 -2500
- data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +0 -1574
- data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +0 -1462
- data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +0 -510
- data/sorbet/rbi/gems/rspec@3.10.0.rbi +0 -39
- data/sorbet/rbi/gems/rubocop-ast@1.11.0.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-performance@1.11.5.rbi +0 -8
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi +0 -8
- data/sorbet/rbi/gems/rubocop@1.20.0.rbi +0 -8
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -577
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +0 -8
- data/sorbet/rbi/gems/solargraph@0.43.0.rbi +0 -8
- data/sorbet/rbi/gems/spoom@1.1.2.rbi +0 -1204
- data/sorbet/rbi/gems/tapioca@0.4.25.rbi +0 -1239
- data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -8
- data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -838
- data/sorbet/rbi/gems/tilt@2.0.10.rbi +0 -8
- data/sorbet/rbi/gems/timecop@0.9.4.rbi +0 -82
- data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -857
- data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -8
- data/sorbet/rbi/gems/unparser@0.6.0.rbi +0 -8
- data/sorbet/rbi/gems/vcr@6.0.0.rbi +0 -782
- data/sorbet/rbi/gems/yard-sorbet@0.5.3.rbi +0 -8
- data/sorbet/rbi/gems/yard@0.9.26.rbi +0 -8
- data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -173
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
|
|
3
|
+
# DO NOT EDIT MANUALLY
|
|
4
|
+
# This is an autogenerated file for types exported from the `tilt` gem.
|
|
5
|
+
# Please instead update this file by running `bin/tapioca gem tilt`.
|
|
6
|
+
|
|
7
|
+
# Namespace for Tilt. This module is not intended to be included anywhere.
|
|
8
|
+
#
|
|
9
|
+
# source://tilt//lib/tilt/mapping.rb#3
|
|
10
|
+
module Tilt
|
|
11
|
+
class << self
|
|
12
|
+
# @see Tilt::Mapping#[]
|
|
13
|
+
#
|
|
14
|
+
# source://tilt//lib/tilt.rb#47
|
|
15
|
+
def [](file); end
|
|
16
|
+
|
|
17
|
+
# @example
|
|
18
|
+
# tmpl = Tilt['index.erb'].new { '<%= Tilt.current_template %>' }
|
|
19
|
+
# tmpl.render == tmpl.to_s
|
|
20
|
+
# @note This is currently an experimental feature and might return nil
|
|
21
|
+
# in the future.
|
|
22
|
+
# @return the template object that is currently rendering.
|
|
23
|
+
#
|
|
24
|
+
# source://tilt//lib/tilt.rb#69
|
|
25
|
+
def current_template; end
|
|
26
|
+
|
|
27
|
+
# @return [Tilt::Mapping] the main mapping object
|
|
28
|
+
#
|
|
29
|
+
# source://tilt//lib/tilt.rb#12
|
|
30
|
+
def default_mapping; end
|
|
31
|
+
|
|
32
|
+
# @private
|
|
33
|
+
#
|
|
34
|
+
# source://tilt//lib/tilt.rb#17
|
|
35
|
+
def lazy_map; end
|
|
36
|
+
|
|
37
|
+
# @see Tilt::Mapping#new
|
|
38
|
+
#
|
|
39
|
+
# source://tilt//lib/tilt.rb#42
|
|
40
|
+
def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end
|
|
41
|
+
|
|
42
|
+
# @deprecated Use {register} instead.
|
|
43
|
+
#
|
|
44
|
+
# source://tilt//lib/tilt.rb#32
|
|
45
|
+
def prefer(template_class, *extensions); end
|
|
46
|
+
|
|
47
|
+
# @see Tilt::Mapping#register
|
|
48
|
+
#
|
|
49
|
+
# source://tilt//lib/tilt.rb#22
|
|
50
|
+
def register(template_class, *extensions); end
|
|
51
|
+
|
|
52
|
+
# @see Tilt::Mapping#register_lazy
|
|
53
|
+
#
|
|
54
|
+
# source://tilt//lib/tilt.rb#27
|
|
55
|
+
def register_lazy(class_name, file, *extensions); end
|
|
56
|
+
|
|
57
|
+
# @return [Boolean]
|
|
58
|
+
# @see Tilt::Mapping#registered?
|
|
59
|
+
#
|
|
60
|
+
# source://tilt//lib/tilt.rb#37
|
|
61
|
+
def registered?(ext); end
|
|
62
|
+
|
|
63
|
+
# @see Tilt::Mapping#template_for
|
|
64
|
+
#
|
|
65
|
+
# source://tilt//lib/tilt.rb#52
|
|
66
|
+
def template_for(file); end
|
|
67
|
+
|
|
68
|
+
# @see Tilt::Mapping#templates_for
|
|
69
|
+
#
|
|
70
|
+
# source://tilt//lib/tilt.rb#57
|
|
71
|
+
def templates_for(file); end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# CSV Template implementation. See:
|
|
76
|
+
# http://ruby-doc.org/stdlib/libdoc/csv/rdoc/CSV.html
|
|
77
|
+
#
|
|
78
|
+
# == Example
|
|
79
|
+
#
|
|
80
|
+
# # Example of csv template
|
|
81
|
+
# tpl = <<-EOS
|
|
82
|
+
# # header
|
|
83
|
+
# csv << ['NAME', 'ID']
|
|
84
|
+
#
|
|
85
|
+
# # data rows
|
|
86
|
+
# @people.each do |person|
|
|
87
|
+
# csv << [person[:name], person[:id]]
|
|
88
|
+
# end
|
|
89
|
+
# EOS
|
|
90
|
+
#
|
|
91
|
+
# @people = [
|
|
92
|
+
# {:name => "Joshua Peek", :id => 1},
|
|
93
|
+
# {:name => "Ryan Tomayko", :id => 2},
|
|
94
|
+
# {:name => "Simone Carletti", :id => 3}
|
|
95
|
+
# ]
|
|
96
|
+
#
|
|
97
|
+
# template = Tilt::CSVTemplate.new { tpl }
|
|
98
|
+
# template.render(self)
|
|
99
|
+
#
|
|
100
|
+
# source://tilt//lib/tilt/csv.rb#36
|
|
101
|
+
class Tilt::CSVTemplate < ::Tilt::Template
|
|
102
|
+
# source://tilt//lib/tilt/csv.rb#59
|
|
103
|
+
def precompiled(locals); end
|
|
104
|
+
|
|
105
|
+
# source://tilt//lib/tilt/csv.rb#51
|
|
106
|
+
def precompiled_template(locals); end
|
|
107
|
+
|
|
108
|
+
# source://tilt//lib/tilt/csv.rb#47
|
|
109
|
+
def prepare; end
|
|
110
|
+
|
|
111
|
+
class << self
|
|
112
|
+
# source://tilt//lib/tilt/csv.rb#39
|
|
113
|
+
def engine; end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Extremely simple template cache implementation. Calling applications
|
|
118
|
+
# create a Tilt::Cache instance and use #fetch with any set of hashable
|
|
119
|
+
# arguments (such as those to Tilt.new):
|
|
120
|
+
#
|
|
121
|
+
# cache = Tilt::Cache.new
|
|
122
|
+
# cache.fetch(path, line, options) { Tilt.new(path, line, options) }
|
|
123
|
+
#
|
|
124
|
+
# Subsequent invocations return the already loaded template object.
|
|
125
|
+
#
|
|
126
|
+
# @note Tilt::Cache is a thin wrapper around Hash. It has the following
|
|
127
|
+
# limitations:
|
|
128
|
+
# * Not thread-safe.
|
|
129
|
+
# * Size is unbounded.
|
|
130
|
+
# * Keys are not copied defensively, and should not be modified after
|
|
131
|
+
# being passed to #fetch. More specifically, the values returned by
|
|
132
|
+
# key#hash and key#eql? should not change.
|
|
133
|
+
# If this is too limiting for you, use a different cache implementation.
|
|
134
|
+
#
|
|
135
|
+
# source://tilt//lib/tilt.rb#91
|
|
136
|
+
class Tilt::Cache
|
|
137
|
+
# @return [Cache] a new instance of Cache
|
|
138
|
+
#
|
|
139
|
+
# source://tilt//lib/tilt.rb#92
|
|
140
|
+
def initialize; end
|
|
141
|
+
|
|
142
|
+
# Clears the cache.
|
|
143
|
+
#
|
|
144
|
+
# source://tilt//lib/tilt.rb#109
|
|
145
|
+
def clear; end
|
|
146
|
+
|
|
147
|
+
# Caches a value for key, or returns the previously cached value.
|
|
148
|
+
# If a value has been previously cached for key then it is
|
|
149
|
+
# returned. Otherwise, block is yielded to and its return value
|
|
150
|
+
# which may be nil, is cached under key and returned.
|
|
151
|
+
#
|
|
152
|
+
# @yield
|
|
153
|
+
# @yieldreturn the value to cache for key
|
|
154
|
+
#
|
|
155
|
+
# source://tilt//lib/tilt.rb#102
|
|
156
|
+
def fetch(*key); end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# source://tilt//lib/tilt/template.rb#7
|
|
160
|
+
module Tilt::CompiledTemplates; end
|
|
161
|
+
|
|
162
|
+
# Used for detecting autoloading bug in JRuby
|
|
163
|
+
#
|
|
164
|
+
# source://tilt//lib/tilt/dummy.rb#2
|
|
165
|
+
class Tilt::Dummy; end
|
|
166
|
+
|
|
167
|
+
# ERB template implementation. See:
|
|
168
|
+
# http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html
|
|
169
|
+
#
|
|
170
|
+
# source://tilt//lib/tilt/erb.rb#7
|
|
171
|
+
class Tilt::ERBTemplate < ::Tilt::Template
|
|
172
|
+
# source://tilt//lib/tilt/erb.rb#56
|
|
173
|
+
def precompiled(locals); end
|
|
174
|
+
|
|
175
|
+
# source://tilt//lib/tilt/erb.rb#44
|
|
176
|
+
def precompiled_postamble(locals); end
|
|
177
|
+
|
|
178
|
+
# source://tilt//lib/tilt/erb.rb#36
|
|
179
|
+
def precompiled_preamble(locals); end
|
|
180
|
+
|
|
181
|
+
# source://tilt//lib/tilt/erb.rb#31
|
|
182
|
+
def precompiled_template(locals); end
|
|
183
|
+
|
|
184
|
+
# source://tilt//lib/tilt/erb.rb#21
|
|
185
|
+
def prepare; end
|
|
186
|
+
|
|
187
|
+
class << self
|
|
188
|
+
# source://tilt//lib/tilt/erb.rb#12
|
|
189
|
+
def default_output_variable; end
|
|
190
|
+
|
|
191
|
+
# source://tilt//lib/tilt/erb.rb#16
|
|
192
|
+
def default_output_variable=(name); end
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# source://tilt//lib/tilt/erb.rb#10
|
|
197
|
+
Tilt::ERBTemplate::SUPPORTS_KVARGS = T.let(T.unsafe(nil), Array)
|
|
198
|
+
|
|
199
|
+
# source://tilt//lib/tilt/etanni.rb#4
|
|
200
|
+
class Tilt::EtanniTemplate < ::Tilt::Template
|
|
201
|
+
# source://tilt//lib/tilt/etanni.rb#22
|
|
202
|
+
def precompiled(locals); end
|
|
203
|
+
|
|
204
|
+
# source://tilt//lib/tilt/etanni.rb#18
|
|
205
|
+
def precompiled_template(locals); end
|
|
206
|
+
|
|
207
|
+
# source://tilt//lib/tilt/etanni.rb#5
|
|
208
|
+
def prepare; end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Haml template implementation. See:
|
|
212
|
+
# http://haml.hamptoncatlin.com/
|
|
213
|
+
#
|
|
214
|
+
# source://tilt//lib/tilt/haml.rb#7
|
|
215
|
+
class Tilt::HamlTemplate < ::Tilt::Template
|
|
216
|
+
# @raise [ArgumentError]
|
|
217
|
+
#
|
|
218
|
+
# source://tilt//lib/tilt/haml.rb#22
|
|
219
|
+
def evaluate(scope, locals, &block); end
|
|
220
|
+
|
|
221
|
+
# Precompiled Haml source. Taken from the precompiled_with_ambles
|
|
222
|
+
# method in Haml::Precompiler:
|
|
223
|
+
# http://github.com/nex3/haml/blob/master/lib/haml/precompiler.rb#L111-126
|
|
224
|
+
#
|
|
225
|
+
# source://tilt//lib/tilt/haml.rb#27
|
|
226
|
+
def precompiled_template(locals); end
|
|
227
|
+
|
|
228
|
+
# Following definitions are for Haml <= 4 and deprecated.
|
|
229
|
+
#
|
|
230
|
+
# source://tilt//lib/tilt/haml.rb#12
|
|
231
|
+
def prepare; end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Kramdown Markdown implementation. See:
|
|
235
|
+
# http://kramdown.rubyforge.org/
|
|
236
|
+
#
|
|
237
|
+
# source://tilt//lib/tilt/kramdown.rb#7
|
|
238
|
+
class Tilt::KramdownTemplate < ::Tilt::Template
|
|
239
|
+
# @return [Boolean]
|
|
240
|
+
#
|
|
241
|
+
# source://tilt//lib/tilt/kramdown.rb#20
|
|
242
|
+
def allows_script?; end
|
|
243
|
+
|
|
244
|
+
# source://tilt//lib/tilt/kramdown.rb#16
|
|
245
|
+
def evaluate(scope, locals, &block); end
|
|
246
|
+
|
|
247
|
+
# source://tilt//lib/tilt/kramdown.rb#10
|
|
248
|
+
def prepare; end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# source://tilt//lib/tilt/kramdown.rb#8
|
|
252
|
+
Tilt::KramdownTemplate::DUMB_QUOTES = T.let(T.unsafe(nil), Array)
|
|
253
|
+
|
|
254
|
+
# @private
|
|
255
|
+
#
|
|
256
|
+
# source://tilt//lib/tilt/template.rb#16
|
|
257
|
+
Tilt::LOCK = T.let(T.unsafe(nil), Thread::Mutex)
|
|
258
|
+
|
|
259
|
+
# Tilt::Mapping associates file extensions with template implementations.
|
|
260
|
+
#
|
|
261
|
+
# mapping = Tilt::Mapping.new
|
|
262
|
+
# mapping.register(Tilt::RDocTemplate, 'rdoc')
|
|
263
|
+
# mapping['index.rdoc'] # => Tilt::RDocTemplate
|
|
264
|
+
# mapping.new('index.rdoc').render
|
|
265
|
+
#
|
|
266
|
+
# You can use {#register} to register a template class by file
|
|
267
|
+
# extension, {#registered?} to see if a file extension is mapped,
|
|
268
|
+
# {#[]} to lookup template classes, and {#new} to instantiate template
|
|
269
|
+
# objects.
|
|
270
|
+
#
|
|
271
|
+
# Mapping also supports *lazy* template implementations. Note that regularly
|
|
272
|
+
# registered template implementations *always* have preference over lazily
|
|
273
|
+
# registered template implementations. You should use {#register} if you
|
|
274
|
+
# depend on a specific template implementation and {#register_lazy} if there
|
|
275
|
+
# are multiple alternatives.
|
|
276
|
+
#
|
|
277
|
+
# mapping = Tilt::Mapping.new
|
|
278
|
+
# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md')
|
|
279
|
+
# mapping['index.md']
|
|
280
|
+
# # => RDiscount::Template
|
|
281
|
+
#
|
|
282
|
+
# {#register_lazy} takes a class name, a filename, and a list of file
|
|
283
|
+
# extensions. When you try to lookup a template name that matches the
|
|
284
|
+
# file extension, Tilt will automatically try to require the filename and
|
|
285
|
+
# constantize the class name.
|
|
286
|
+
#
|
|
287
|
+
# Unlike {#register}, there can be multiple template implementations
|
|
288
|
+
# registered lazily to the same file extension. Tilt will attempt to load the
|
|
289
|
+
# template implementations in order (registered *last* would be tried first),
|
|
290
|
+
# returning the first which doesn't raise LoadError.
|
|
291
|
+
#
|
|
292
|
+
# If all of the registered template implementations fails, Tilt will raise
|
|
293
|
+
# the exception of the first, since that was the most preferred one.
|
|
294
|
+
#
|
|
295
|
+
# mapping = Tilt::Mapping.new
|
|
296
|
+
# mapping.register_lazy('Bluecloth::Template', 'bluecloth/template', 'md')
|
|
297
|
+
# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md')
|
|
298
|
+
# mapping['index.md']
|
|
299
|
+
# # => RDiscount::Template
|
|
300
|
+
#
|
|
301
|
+
# In the previous example we say that RDiscount has a *higher priority* than
|
|
302
|
+
# BlueCloth. Tilt will first try to `require "rdiscount/template"`, falling
|
|
303
|
+
# back to `require "bluecloth/template"`. If none of these are successful,
|
|
304
|
+
# the first error will be raised.
|
|
305
|
+
#
|
|
306
|
+
# source://tilt//lib/tilt/mapping.rb#50
|
|
307
|
+
class Tilt::Mapping
|
|
308
|
+
# @return [Mapping] a new instance of Mapping
|
|
309
|
+
#
|
|
310
|
+
# source://tilt//lib/tilt/mapping.rb#54
|
|
311
|
+
def initialize; end
|
|
312
|
+
|
|
313
|
+
# Looks up a template class based on file name and/or extension.
|
|
314
|
+
#
|
|
315
|
+
# @example
|
|
316
|
+
# mapping['views/hello.erb'] # => Tilt::ERBTemplate
|
|
317
|
+
# mapping['hello.erb'] # => Tilt::ERBTemplate
|
|
318
|
+
# mapping['erb'] # => Tilt::ERBTemplate
|
|
319
|
+
# @return [template class]
|
|
320
|
+
#
|
|
321
|
+
# source://tilt//lib/tilt/mapping.rb#152
|
|
322
|
+
def [](file); end
|
|
323
|
+
|
|
324
|
+
# Finds the extensions the template class has been registered under.
|
|
325
|
+
#
|
|
326
|
+
# @param template_class [template class]
|
|
327
|
+
#
|
|
328
|
+
# source://tilt//lib/tilt/mapping.rb#183
|
|
329
|
+
def extensions_for(template_class); end
|
|
330
|
+
|
|
331
|
+
# @private
|
|
332
|
+
#
|
|
333
|
+
# source://tilt//lib/tilt/mapping.rb#52
|
|
334
|
+
def lazy_map; end
|
|
335
|
+
|
|
336
|
+
# Instantiates a new template class based on the file.
|
|
337
|
+
#
|
|
338
|
+
# @example
|
|
339
|
+
# mapping.new('index.mt') # => instance of MyEngine::Template
|
|
340
|
+
# @raise [RuntimeError] if there is no template class registered for the
|
|
341
|
+
# file name.
|
|
342
|
+
# @see Tilt::Template.new
|
|
343
|
+
#
|
|
344
|
+
# source://tilt//lib/tilt/mapping.rb#136
|
|
345
|
+
def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end
|
|
346
|
+
|
|
347
|
+
# Registers a template implementation by file extension. There can only be
|
|
348
|
+
# one template implementation per file extension, and this method will
|
|
349
|
+
# override any existing mapping.
|
|
350
|
+
#
|
|
351
|
+
# @example
|
|
352
|
+
# mapping.register MyEngine::Template, 'mt'
|
|
353
|
+
# mapping['index.mt'] # => MyEngine::Template
|
|
354
|
+
# @param template_class
|
|
355
|
+
# @param extensions [Array<String>] List of extensions.
|
|
356
|
+
# @return [void]
|
|
357
|
+
#
|
|
358
|
+
# source://tilt//lib/tilt/mapping.rb#104
|
|
359
|
+
def register(template_class, *extensions); end
|
|
360
|
+
|
|
361
|
+
# Registers a lazy template implementation by file extension. You
|
|
362
|
+
# can have multiple lazy template implementations defined on the
|
|
363
|
+
# same file extension, in which case the template implementation
|
|
364
|
+
# defined *last* will be attempted loaded *first*.
|
|
365
|
+
#
|
|
366
|
+
# @example
|
|
367
|
+
# mapping.register_lazy 'MyEngine::Template', 'my_engine/template', 'mt'
|
|
368
|
+
#
|
|
369
|
+
# defined?(MyEngine::Template) # => false
|
|
370
|
+
# mapping['index.mt'] # => MyEngine::Template
|
|
371
|
+
# defined?(MyEngine::Template) # => true
|
|
372
|
+
# @param class_name [String] Class name of a template class.
|
|
373
|
+
# @param file [String] Filename where the template class is defined.
|
|
374
|
+
# @param extensions [Array<String>] List of extensions.
|
|
375
|
+
# @return [void]
|
|
376
|
+
#
|
|
377
|
+
# source://tilt//lib/tilt/mapping.rb#81
|
|
378
|
+
def register_lazy(class_name, file, *extensions); end
|
|
379
|
+
|
|
380
|
+
# Checks if a file extension is registered (either eagerly or
|
|
381
|
+
# lazily) in this mapping.
|
|
382
|
+
#
|
|
383
|
+
# @example
|
|
384
|
+
# mapping.registered?('erb') # => true
|
|
385
|
+
# mapping.registered?('nope') # => false
|
|
386
|
+
# @param ext [String] File extension.
|
|
387
|
+
# @return [Boolean]
|
|
388
|
+
#
|
|
389
|
+
# source://tilt//lib/tilt/mapping.rb#123
|
|
390
|
+
def registered?(ext); end
|
|
391
|
+
|
|
392
|
+
# Looks up a template class based on file name and/or extension.
|
|
393
|
+
#
|
|
394
|
+
# @example
|
|
395
|
+
# mapping['views/hello.erb'] # => Tilt::ERBTemplate
|
|
396
|
+
# mapping['hello.erb'] # => Tilt::ERBTemplate
|
|
397
|
+
# mapping['erb'] # => Tilt::ERBTemplate
|
|
398
|
+
# @return [template class]
|
|
399
|
+
#
|
|
400
|
+
# source://tilt//lib/tilt/mapping.rb#152
|
|
401
|
+
def template_for(file); end
|
|
402
|
+
|
|
403
|
+
# @private
|
|
404
|
+
#
|
|
405
|
+
# source://tilt//lib/tilt/mapping.rb#52
|
|
406
|
+
def template_map; end
|
|
407
|
+
|
|
408
|
+
# Looks up a list of template classes based on file name. If the file name
|
|
409
|
+
# has multiple extensions, it will return all template classes matching the
|
|
410
|
+
# extensions from the end.
|
|
411
|
+
#
|
|
412
|
+
# @example
|
|
413
|
+
# mapping.templates_for('views/index.haml.erb')
|
|
414
|
+
# # => [Tilt::ERBTemplate, Tilt::HamlTemplate]
|
|
415
|
+
# @return [Array<template class>]
|
|
416
|
+
#
|
|
417
|
+
# source://tilt//lib/tilt/mapping.rb#168
|
|
418
|
+
def templates_for(file); end
|
|
419
|
+
|
|
420
|
+
private
|
|
421
|
+
|
|
422
|
+
# The proper behavior (in MRI) for autoload? is to
|
|
423
|
+
# return `false` when the constant/file has been
|
|
424
|
+
# explicitly required.
|
|
425
|
+
#
|
|
426
|
+
# However, in JRuby it returns `true` even after it's
|
|
427
|
+
# been required. In that case it turns out that `defined?`
|
|
428
|
+
# returns `"constant"` if it exists and `nil` when it doesn't.
|
|
429
|
+
# This is actually a second bug: `defined?` should resolve
|
|
430
|
+
# autoload (aka. actually try to require the file).
|
|
431
|
+
#
|
|
432
|
+
# We use the second bug in order to resolve the first bug.
|
|
433
|
+
#
|
|
434
|
+
# @return [Boolean]
|
|
435
|
+
#
|
|
436
|
+
# source://tilt//lib/tilt/mapping.rb#277
|
|
437
|
+
def constant_defined?(name); end
|
|
438
|
+
|
|
439
|
+
# @private
|
|
440
|
+
#
|
|
441
|
+
# source://tilt//lib/tilt/mapping.rb#60
|
|
442
|
+
def initialize_copy(other); end
|
|
443
|
+
|
|
444
|
+
# @return [Boolean]
|
|
445
|
+
#
|
|
446
|
+
# source://tilt//lib/tilt/mapping.rb#196
|
|
447
|
+
def lazy?(ext); end
|
|
448
|
+
|
|
449
|
+
# source://tilt//lib/tilt/mapping.rb#221
|
|
450
|
+
def lazy_load(pattern); end
|
|
451
|
+
|
|
452
|
+
# source://tilt//lib/tilt/mapping.rb#215
|
|
453
|
+
def lookup(ext); end
|
|
454
|
+
|
|
455
|
+
# source://tilt//lib/tilt/mapping.rb#201
|
|
456
|
+
def split(file); end
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
# source://tilt//lib/tilt/mapping.rb#263
|
|
460
|
+
Tilt::Mapping::AUTOLOAD_IS_BROKEN = T.let(T.unsafe(nil), T.untyped)
|
|
461
|
+
|
|
462
|
+
# source://tilt//lib/tilt/mapping.rb#219
|
|
463
|
+
Tilt::Mapping::LOCK = T.let(T.unsafe(nil), Monitor)
|
|
464
|
+
|
|
465
|
+
# Nokogiri template implementation. See:
|
|
466
|
+
# http://nokogiri.org/
|
|
467
|
+
#
|
|
468
|
+
# source://tilt//lib/tilt/nokogiri.rb#7
|
|
469
|
+
class Tilt::NokogiriTemplate < ::Tilt::Template
|
|
470
|
+
# source://tilt//lib/tilt/nokogiri.rb#13
|
|
471
|
+
def evaluate(scope, locals); end
|
|
472
|
+
|
|
473
|
+
# source://tilt//lib/tilt/nokogiri.rb#27
|
|
474
|
+
def precompiled_postamble(locals); end
|
|
475
|
+
|
|
476
|
+
# source://tilt//lib/tilt/nokogiri.rb#22
|
|
477
|
+
def precompiled_preamble(locals); end
|
|
478
|
+
|
|
479
|
+
# source://tilt//lib/tilt/nokogiri.rb#31
|
|
480
|
+
def precompiled_template(locals); end
|
|
481
|
+
|
|
482
|
+
# source://tilt//lib/tilt/nokogiri.rb#11
|
|
483
|
+
def prepare; end
|
|
484
|
+
end
|
|
485
|
+
|
|
486
|
+
# source://tilt//lib/tilt/nokogiri.rb#8
|
|
487
|
+
Tilt::NokogiriTemplate::DOCUMENT_HEADER = T.let(T.unsafe(nil), Regexp)
|
|
488
|
+
|
|
489
|
+
# Raw text (no template functionality).
|
|
490
|
+
#
|
|
491
|
+
# source://tilt//lib/tilt/plain.rb#6
|
|
492
|
+
class Tilt::PlainTemplate < ::Tilt::Template
|
|
493
|
+
# source://tilt//lib/tilt/plain.rb#12
|
|
494
|
+
def evaluate(scope, locals, &block); end
|
|
495
|
+
|
|
496
|
+
# source://tilt//lib/tilt/plain.rb#9
|
|
497
|
+
def prepare; end
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
# RDoc template. See:
|
|
501
|
+
# http://rdoc.rubyforge.org/
|
|
502
|
+
#
|
|
503
|
+
# It's suggested that your program `require 'rdoc/markup'` and
|
|
504
|
+
# `require 'rdoc/markup/to_html'` at load time when using this template
|
|
505
|
+
# engine in a threaded environment.
|
|
506
|
+
#
|
|
507
|
+
# source://tilt//lib/tilt/rdoc.rb#13
|
|
508
|
+
class Tilt::RDocTemplate < ::Tilt::Template
|
|
509
|
+
# @return [Boolean]
|
|
510
|
+
#
|
|
511
|
+
# source://tilt//lib/tilt/rdoc.rb#36
|
|
512
|
+
def allows_script?; end
|
|
513
|
+
|
|
514
|
+
# source://tilt//lib/tilt/rdoc.rb#32
|
|
515
|
+
def evaluate(scope, locals, &block); end
|
|
516
|
+
|
|
517
|
+
# source://tilt//lib/tilt/rdoc.rb#16
|
|
518
|
+
def markup; end
|
|
519
|
+
|
|
520
|
+
# source://tilt//lib/tilt/rdoc.rb#27
|
|
521
|
+
def prepare; end
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
# Standalone string interpolator and template processor implementation in Go.
|
|
525
|
+
# see: https://github.com/gliderlabs/sigil
|
|
526
|
+
#
|
|
527
|
+
# source://tilt//lib/tilt/sigil.rb#7
|
|
528
|
+
class Tilt::SigilTemplate < ::Tilt::Template
|
|
529
|
+
# @return [Boolean]
|
|
530
|
+
#
|
|
531
|
+
# source://tilt//lib/tilt/sigil.rb#30
|
|
532
|
+
def allows_script?; end
|
|
533
|
+
|
|
534
|
+
# source://tilt//lib/tilt/sigil.rb#11
|
|
535
|
+
def evaluate(scope, locals, &block); end
|
|
536
|
+
|
|
537
|
+
# source://tilt//lib/tilt/sigil.rb#8
|
|
538
|
+
def prepare; end
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# The template source is evaluated as a Ruby string. The #{} interpolation
|
|
542
|
+
# syntax can be used to generated dynamic output.
|
|
543
|
+
#
|
|
544
|
+
# source://tilt//lib/tilt/string.rb#6
|
|
545
|
+
class Tilt::StringTemplate < ::Tilt::Template
|
|
546
|
+
# source://tilt//lib/tilt/string.rb#16
|
|
547
|
+
def precompiled(locals); end
|
|
548
|
+
|
|
549
|
+
# source://tilt//lib/tilt/string.rb#12
|
|
550
|
+
def precompiled_template(locals); end
|
|
551
|
+
|
|
552
|
+
# source://tilt//lib/tilt/string.rb#7
|
|
553
|
+
def prepare; end
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
# @private
|
|
557
|
+
#
|
|
558
|
+
# source://tilt//lib/tilt/template.rb#5
|
|
559
|
+
Tilt::TOPOBJECT = Tilt::CompiledTemplates
|
|
560
|
+
|
|
561
|
+
# Base class for template implementations. Subclasses must implement
|
|
562
|
+
# the #prepare method and one of the #evaluate or #precompiled_template
|
|
563
|
+
# methods.
|
|
564
|
+
#
|
|
565
|
+
# source://tilt//lib/tilt/template.rb#21
|
|
566
|
+
class Tilt::Template
|
|
567
|
+
# Create a new template with the file, line, and options specified. By
|
|
568
|
+
# default, template data is read from the file. When a block is given,
|
|
569
|
+
# it should read template data and return as a String. When file is nil,
|
|
570
|
+
# a block is required.
|
|
571
|
+
#
|
|
572
|
+
# All arguments are optional.
|
|
573
|
+
#
|
|
574
|
+
# @raise [ArgumentError]
|
|
575
|
+
# @return [Template] a new instance of Template
|
|
576
|
+
#
|
|
577
|
+
# source://tilt//lib/tilt/template.rb#60
|
|
578
|
+
def initialize(file = T.unsafe(nil), line = T.unsafe(nil), options = T.unsafe(nil), &block); end
|
|
579
|
+
|
|
580
|
+
# The basename of the template file.
|
|
581
|
+
#
|
|
582
|
+
# source://tilt//lib/tilt/template.rb#115
|
|
583
|
+
def basename(suffix = T.unsafe(nil)); end
|
|
584
|
+
|
|
585
|
+
# Template source; loaded from a file or given directly.
|
|
586
|
+
#
|
|
587
|
+
# source://tilt//lib/tilt/template.rb#23
|
|
588
|
+
def data; end
|
|
589
|
+
|
|
590
|
+
# The filename used in backtraces to describe the template.
|
|
591
|
+
#
|
|
592
|
+
# source://tilt//lib/tilt/template.rb#125
|
|
593
|
+
def eval_file; end
|
|
594
|
+
|
|
595
|
+
# The name of the file where the template data was loaded from.
|
|
596
|
+
#
|
|
597
|
+
# source://tilt//lib/tilt/template.rb#26
|
|
598
|
+
def file; end
|
|
599
|
+
|
|
600
|
+
# The line number in #file where template data was loaded from.
|
|
601
|
+
#
|
|
602
|
+
# source://tilt//lib/tilt/template.rb#29
|
|
603
|
+
def line; end
|
|
604
|
+
|
|
605
|
+
# An empty Hash that the template engine can populate with various
|
|
606
|
+
# metadata.
|
|
607
|
+
#
|
|
608
|
+
# source://tilt//lib/tilt/template.rb#131
|
|
609
|
+
def metadata; end
|
|
610
|
+
|
|
611
|
+
# The template file's basename with all extensions chomped off.
|
|
612
|
+
#
|
|
613
|
+
# source://tilt//lib/tilt/template.rb#120
|
|
614
|
+
def name; end
|
|
615
|
+
|
|
616
|
+
# A Hash of template engine specific options. This is passed directly
|
|
617
|
+
# to the underlying engine and is not used by the generic template
|
|
618
|
+
# interface.
|
|
619
|
+
#
|
|
620
|
+
# source://tilt//lib/tilt/template.rb#34
|
|
621
|
+
def options; end
|
|
622
|
+
|
|
623
|
+
# Render the template in the given scope with the locals specified. If a
|
|
624
|
+
# block is given, it is typically available within the template via
|
|
625
|
+
# +yield+.
|
|
626
|
+
#
|
|
627
|
+
# source://tilt//lib/tilt/template.rb#105
|
|
628
|
+
def render(scope = T.unsafe(nil), locals = T.unsafe(nil), &block); end
|
|
629
|
+
|
|
630
|
+
protected
|
|
631
|
+
|
|
632
|
+
# The encoding of the source data. Defaults to the
|
|
633
|
+
# default_encoding-option if present. You may override this method
|
|
634
|
+
# in your template class if you have a better hint of the data's
|
|
635
|
+
# encoding.
|
|
636
|
+
#
|
|
637
|
+
# source://tilt//lib/tilt/template.rb#147
|
|
638
|
+
def default_encoding; end
|
|
639
|
+
|
|
640
|
+
# Execute the compiled template and return the result string. Template
|
|
641
|
+
# evaluation is guaranteed to be performed in the scope object with the
|
|
642
|
+
# locals specified and with support for yielding to the block.
|
|
643
|
+
#
|
|
644
|
+
# This method is only used by source generating templates. Subclasses that
|
|
645
|
+
# override render() may not support all features.
|
|
646
|
+
#
|
|
647
|
+
# source://tilt//lib/tilt/template.rb#168
|
|
648
|
+
def evaluate(scope, locals, &block); end
|
|
649
|
+
|
|
650
|
+
# Generates all template source by combining the preamble, template, and
|
|
651
|
+
# postamble and returns a two-tuple of the form: [source, offset], where
|
|
652
|
+
# source is the string containing (Ruby) source code for the template and
|
|
653
|
+
# offset is the integer line offset where line reporting should begin.
|
|
654
|
+
#
|
|
655
|
+
# Template subclasses may override this method when they need complete
|
|
656
|
+
# control over source generation or want to adjust the default line
|
|
657
|
+
# offset. In most cases, overriding the #precompiled_template method is
|
|
658
|
+
# easier and more appropriate.
|
|
659
|
+
#
|
|
660
|
+
# source://tilt//lib/tilt/template.rb#193
|
|
661
|
+
def precompiled(local_keys); end
|
|
662
|
+
|
|
663
|
+
# source://tilt//lib/tilt/template.rb#227
|
|
664
|
+
def precompiled_postamble(local_keys); end
|
|
665
|
+
|
|
666
|
+
# source://tilt//lib/tilt/template.rb#223
|
|
667
|
+
def precompiled_preamble(local_keys); end
|
|
668
|
+
|
|
669
|
+
# A string containing the (Ruby) source code for the template. The
|
|
670
|
+
# default Template#evaluate implementation requires either this
|
|
671
|
+
# method or the #precompiled method be overridden. When defined,
|
|
672
|
+
# the base Template guarantees correct file/line handling, locals
|
|
673
|
+
# support, custom scopes, proper encoding, and support for template
|
|
674
|
+
# compilation.
|
|
675
|
+
#
|
|
676
|
+
# @raise [NotImplementedError]
|
|
677
|
+
#
|
|
678
|
+
# source://tilt//lib/tilt/template.rb#219
|
|
679
|
+
def precompiled_template(local_keys); end
|
|
680
|
+
|
|
681
|
+
# Do whatever preparation is necessary to setup the underlying template
|
|
682
|
+
# engine. Called immediately after template data is loaded. Instance
|
|
683
|
+
# variables set in this method are available when #evaluate is called.
|
|
684
|
+
#
|
|
685
|
+
# Subclasses must provide an implementation of this method.
|
|
686
|
+
#
|
|
687
|
+
# @raise [NotImplementedError]
|
|
688
|
+
#
|
|
689
|
+
# source://tilt//lib/tilt/template.rb#156
|
|
690
|
+
def prepare; end
|
|
691
|
+
|
|
692
|
+
private
|
|
693
|
+
|
|
694
|
+
# source://tilt//lib/tilt/template.rb#300
|
|
695
|
+
def binary(string); end
|
|
696
|
+
|
|
697
|
+
# source://tilt//lib/tilt/template.rb#261
|
|
698
|
+
def compile_template_method(local_keys, scope_class = T.unsafe(nil)); end
|
|
699
|
+
|
|
700
|
+
# The compiled method for the locals keys provided.
|
|
701
|
+
#
|
|
702
|
+
# source://tilt//lib/tilt/template.rb#245
|
|
703
|
+
def compiled_method(locals_keys, scope_class = T.unsafe(nil)); end
|
|
704
|
+
|
|
705
|
+
# source://tilt//lib/tilt/template.rb#290
|
|
706
|
+
def extract_encoding(script); end
|
|
707
|
+
|
|
708
|
+
# source://tilt//lib/tilt/template.rb#294
|
|
709
|
+
def extract_magic_comment(script); end
|
|
710
|
+
|
|
711
|
+
# source://tilt//lib/tilt/template.rb#251
|
|
712
|
+
def local_extraction(local_keys); end
|
|
713
|
+
|
|
714
|
+
# source://tilt//lib/tilt/template.rb#235
|
|
715
|
+
def read_template_file; end
|
|
716
|
+
|
|
717
|
+
# source://tilt//lib/tilt/template.rb#284
|
|
718
|
+
def unbind_compiled_method(method_name); end
|
|
719
|
+
|
|
720
|
+
class << self
|
|
721
|
+
# @deprecated Use `.metadata[:mime_type]` instead.
|
|
722
|
+
#
|
|
723
|
+
# source://tilt//lib/tilt/template.rb#44
|
|
724
|
+
def default_mime_type; end
|
|
725
|
+
|
|
726
|
+
# @deprecated Use `.metadata[:mime_type] = val` instead.
|
|
727
|
+
#
|
|
728
|
+
# source://tilt//lib/tilt/template.rb#49
|
|
729
|
+
def default_mime_type=(value); end
|
|
730
|
+
|
|
731
|
+
# An empty Hash that the template engine can populate with various
|
|
732
|
+
# metadata.
|
|
733
|
+
#
|
|
734
|
+
# source://tilt//lib/tilt/template.rb#39
|
|
735
|
+
def metadata; end
|
|
736
|
+
end
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# source://tilt//lib/tilt/template.rb#160
|
|
740
|
+
Tilt::Template::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
|
741
|
+
|
|
742
|
+
# Current version.
|
|
743
|
+
#
|
|
744
|
+
# source://tilt//lib/tilt.rb#7
|
|
745
|
+
Tilt::VERSION = T.let(T.unsafe(nil), String)
|