Class: Tapioca::Loaders::Dsl

Inherits:
Loader
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/tapioca/loaders/dsl.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from GemHelper

#gem_in_app_dir?, #gem_in_bundle_path?, #gem_in_ruby_path?, #to_realpath

Methods included from CliHelper

#netrc_file, #rbi_formatter, #say_error

Class Method Details

.load_application(tapioca_path:, eager_load: true, app_root: ".", halt_upon_load_error: true, lsp_addon: false) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/tapioca/loaders/dsl.rb', line 21

def load_application(
  tapioca_path:,
  eager_load: true,
  app_root: ".",
  halt_upon_load_error: true,
  lsp_addon: false
)
  loader = new(
    tapioca_path: tapioca_path,
    eager_load: eager_load,
    app_root: app_root,
    halt_upon_load_error: halt_upon_load_error,
  )
  if lsp_addon
    loader.load_dsl_extensions_and_compilers
  else
    loader.load
  end
end

Instance Method Details

#loadObject



43
44
45
46
47
# File 'lib/tapioca/loaders/dsl.rb', line 43

def load
  load_dsl_extensions
  load_application
  load_dsl_compilers
end

#load_dsl_extensions_and_compilersObject



50
51
52
53
# File 'lib/tapioca/loaders/dsl.rb', line 50

def load_dsl_extensions_and_compilers
  load_dsl_extensions
  load_dsl_compilers
end