Class: RubyLsp::Tapioca::RunGemRbiCheck
- Inherits:
-
Object
- Object
- RubyLsp::Tapioca::RunGemRbiCheck
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_lsp/tapioca/run_gem_rbi_check.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize(project_path) ⇒ RunGemRbiCheck
constructor
A new instance of RunGemRbiCheck.
- #run ⇒ Object
Constructor Details
#initialize(project_path) ⇒ RunGemRbiCheck
Returns a new instance of RunGemRbiCheck.
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 = T.let("", String) @stderr = T.let("", String) @status = T.let(nil, T.nilable(Process::Status)) end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 14 def status @status end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
13 14 15 |
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 13 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
12 13 14 |
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 12 def stdout @stdout end |
Instance Method Details
#run ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/ruby_lsp/tapioca/run_gem_rbi_check.rb', line 25 def run return ("Not a git repository") unless git_repo? cleanup_orphaned_rbis if lockfile_changed? generate_gem_rbis end end |