Class: Guard::Sorbet
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Sorbet
- Extended by:
- T::Sig
- Defined in:
- lib/guard/sorbet.rb
Instance Method Summary collapse
-
#initialize(options = nil) ⇒ Sorbet
constructor
A new instance of Sorbet.
- #run_all ⇒ Object
- #run_on_modifications(_) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(options = nil) ⇒ Sorbet
Returns a new instance of Sorbet.
11 12 13 14 15 16 |
# File 'lib/guard/sorbet.rb', line 11 def initialize( = nil) super() @version = T.let('0.0.1', String) @sorbet_version = T.let(Gem.loaded_specs['sorbet'].version.to_s, String) end |
Instance Method Details
#run_all ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/guard/sorbet.rb', line 19 def run_all Compat::UI.info "Guard::Sorbet #{@version} is running, with Sorbet #{@sorbet_version}" srb_path = Gem.bin_path 'sorbet', 'srb' if !system(srb_path) Compat::UI.error "srb failed" throw :task_has_failed end end |
#run_on_modifications(_) ⇒ Object
34 35 36 |
# File 'lib/guard/sorbet.rb', line 34 def run_on_modifications(_) run_all end |
#start ⇒ Object
29 30 31 |
# File 'lib/guard/sorbet.rb', line 29 def start run_all end |