Module: Tapioca::Helpers::Test::DslCompiler
Defined Under Namespace
Classes: CompilerContext
Constant Summary
Constants included
from Template
Template::ERB_SUPPORTS_KVARGS
Isolation::Subprocess::ORIG_ARGV
Instance Method Summary
collapse
Methods included from Template
#indented, #rails_version, #ruby_version, #template
Methods included from Content
#add_content_file, #add_ruby_file, #remove_tmp_path, #teardown, #tmp_path
Methods included from Isolation
forking_env?, #run
#run_in_isolation
#run_in_isolation
Instance Method Details
#activate_other_dsl_compilers(*compiler_classes) ⇒ Object
27
28
29
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 27
def activate_other_dsl_compilers(*compiler_classes)
context.activate_other_dsl_compilers(compiler_classes)
end
|
#context ⇒ Object
47
48
49
50
51
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 47
def context
raise "Please call `use_dsl_compiler` before" unless @context
@context
end
|
#gathered_constants ⇒ Object
37
38
39
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 37
def gathered_constants
context.gathered_constants
end
|
#generated_errors ⇒ Object
42
43
44
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 42
def generated_errors
context.errors
end
|
#rbi_for(constant_name) ⇒ Object
32
33
34
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 32
def rbi_for(constant_name)
context.rbi_for(constant_name)
end
|
#use_dsl_compiler(compiler_class) ⇒ Object
22
23
24
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 22
def use_dsl_compiler(compiler_class)
@context = T.let(CompilerContext.new(compiler_class), T.nilable(CompilerContext))
end
|