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
29
30
31
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 29
def activate_other_dsl_compilers(*compiler_classes)
context.activate_other_dsl_compilers(compiler_classes)
end
|
#context ⇒ Object
54
55
56
57
58
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 54
def context
raise "Please call `use_dsl_compiler` before" unless @context
@context
end
|
#gathered_constants ⇒ Object
44
45
46
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 44
def gathered_constants
context.gathered_constants
end
|
#generated_errors ⇒ Object
49
50
51
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 49
def generated_errors
context.errors
end
|
#rbi_for(constant_name, compiler_options: {}) ⇒ Object
39
40
41
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 39
def rbi_for(constant_name, compiler_options: {})
context.rbi_for(constant_name, compiler_options: compiler_options)
end
|
#use_dsl_compiler(compiler_class) ⇒ Object
24
25
26
|
# File 'lib/tapioca/helpers/test/dsl_compiler.rb', line 24
def use_dsl_compiler(compiler_class)
@context = T.let(CompilerContext.new(compiler_class), T.nilable(CompilerContext))
end
|