Class: LogicaCompiler::Commands::Watch

Inherits:
Base
  • Object
show all
Defined in:
lib/logica_compiler/commands/watch.rb

Instance Method Summary collapse

Constructor Details

#initialize(watcher: Watcher, **kwargs) ⇒ Watch

Returns a new instance of Watch.



10
11
12
13
14
# File 'lib/logica_compiler/commands/watch.rb', line 10

def initialize(watcher: Watcher, **kwargs)
  super(**kwargs)
  @watcher = watcher
  @logica = Logica.new(**kwargs)
end

Instance Method Details

#call(config_path:, logica_bin_override: nil) ⇒ Object



16
17
18
19
20
# File 'lib/logica_compiler/commands/watch.rb', line 16

def call(config_path:, logica_bin_override: nil)
  config = load_config(config_path:, logica_bin_override:)
  @logica.ensure_available!(config, allow_install: true)
  @watcher.start!(config_path:)
end