Class: Guard::Srb
- Inherits:
-
Plugin
- Object
- Plugin
- Guard::Srb
- Extended by:
- T::Sig
- Defined in:
- lib/guard/srb.rb,
lib/guard/srb/runner.rb
Defined Under Namespace
Classes: Runner
Constant Summary collapse
- DEFAULT_OPTIONS =
T.let( { all_on_start: true, notification: :failed, hide_stdout: false, colorize: "always" }.freeze, T::Hash[Symbol, T.untyped] )
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Srb
constructor
A new instance of Srb.
- #run_all ⇒ Object
- #run_on_additions(paths) ⇒ Object
- #run_on_modifications(paths) ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Srb
Returns a new instance of Srb.
25 26 27 28 |
# File 'lib/guard/srb.rb', line 25 def initialize( = {}) super @options = T.let(DEFAULT_OPTIONS.merge(@options), T::Hash[Symbol, T.untyped]) end |
Instance Method Details
#run_all ⇒ Object
36 37 38 39 |
# File 'lib/guard/srb.rb', line 36 def run_all UI.info "Typechecking all files" inspect_with_sorbet end |
#run_on_additions(paths) ⇒ Object
42 43 44 |
# File 'lib/guard/srb.rb', line 42 def run_on_additions(paths) run_partially(paths) end |
#run_on_modifications(paths) ⇒ Object
47 48 49 |
# File 'lib/guard/srb.rb', line 47 def run_on_modifications(paths) run_partially(paths) end |
#start ⇒ Object
31 32 33 |
# File 'lib/guard/srb.rb', line 31 def start run_all if @options[:all_on_start] end |