Class: Tapioca::Commands::AbstractGem Abstract

Inherits:
Command
  • Object
show all
Includes:
RBIFilesHelper, SorbetHelper
Defined in:
lib/tapioca/commands/abstract_gem.rb

Overview

This class is abstract.

Direct Known Subclasses

GemGenerate, GemSync, GemVerify

Constant Summary

Constants included from SorbetHelper

SorbetHelper::FEATURE_REQUIREMENTS, SorbetHelper::SORBET_BIN, SorbetHelper::SORBET_EXE_PATH_ENV_VAR, SorbetHelper::SORBET_GEM_SPEC, SorbetHelper::SORBET_PAYLOAD_URL, SorbetHelper::SPOOM_CONTEXT

Instance Method Summary collapse

Methods included from RBIFilesHelper

#duplicated_nodes_from_index, #index_rbi, #index_rbis, #location_to_payload_url, #validate_rbi_files

Methods included from SorbetHelper

#sorbet, #sorbet_path, #sorbet_supports?

Methods inherited from Command

#run

Methods included from Tapioca::CliHelper

#netrc_file, #rbi_formatter, #say_error

Constructor Details

#initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: nil, auto_strictness: true, dsl_dir: DEFAULT_DSL_DIR, rbi_formatter: DEFAULT_RBI_FORMATTER, halt_upon_load_error: true, lsp_addon: false, verbose: false) ⇒ AbstractGem

: ( | gem_names: Array, | exclude: Array, | include_dependencies: bool, | prerequire: String?, | postrequire: String, | typed_overrides: Hash[String, String], | outpath: Pathname, | file_header: bool, | include_doc: bool, | include_loc: bool, | include_exported_rbis: bool, | ?number_of_workers: Integer?, | ?auto_strictness: bool, | ?dsl_dir: String, | ?rbi_formatter: RBIFormatter, | ?halt_upon_load_error: bool, | ?lsp_addon: bool?, | ?verbose: bool? | ) -> void



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/tapioca/commands/abstract_gem.rb', line 31

def initialize(
  gem_names:,
  exclude:,
  include_dependencies:,
  prerequire:,
  postrequire:,
  typed_overrides:,
  outpath:,
  file_header:,
  include_doc:,
  include_loc:,
  include_exported_rbis:,
  number_of_workers: nil,
  auto_strictness: true,
  dsl_dir: DEFAULT_DSL_DIR,
  rbi_formatter: DEFAULT_RBI_FORMATTER,
  halt_upon_load_error: true,
  lsp_addon: false,
  verbose: false
)
  @gem_names = gem_names
  @exclude = exclude
  @include_dependencies = include_dependencies
  @prerequire = prerequire
  @postrequire = postrequire
  @typed_overrides = typed_overrides
  @outpath = outpath
  @file_header = file_header
  @number_of_workers = number_of_workers
  @auto_strictness = auto_strictness
  @dsl_dir = dsl_dir
  @rbi_formatter = rbi_formatter
  @lsp_addon = lsp_addon
  @verbose = verbose

  super()

  @bundle = Gemfile.new(exclude) #: Gemfile
  @existing_rbis = nil #: Hash[String, String]?
  @expected_rbis = nil #: Hash[String, String]?
  @include_doc = include_doc #: bool
  @include_loc = include_loc #: bool
  @include_exported_rbis = include_exported_rbis
  @halt_upon_load_error = halt_upon_load_error
end