Class: RubyLsp::Tapioca::RunGemRbiCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_lsp/tapioca/run_gem_rbi_check.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_path) ⇒ RunGemRbiCheck

: (String project_path) -> void



17
18
19
20
21
22
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 17

def initialize(project_path)
  @project_path = project_path
  @stdout = "" #: String
  @stderr = "" #: String
  @status = nil #: Process::Status?
end

Instance Attribute Details

#statusObject (readonly)

: Process::Status?



14
15
16
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 14

def status
  @status
end

#stderrObject (readonly)

: String



11
12
13
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 11

def stderr
  @stderr
end

#stdoutObject (readonly)

: String



11
12
13
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 11

def stdout
  @stdout
end

Instance Method Details

#runObject

: -> void



25
26
27
28
29
30
31
32
33
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 25

def run
  return log_message("Not a git repository") unless git_repo?

  cleanup_orphaned_rbis

  if lockfile_changed?
    generate_gem_rbis
  end
end