Class: LogicaCompiler::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/logica_compiler/cli.rb

Instance Method Summary collapse

Instance Method Details

#cleanObject



48
49
50
51
52
# File 'lib/logica_compiler/cli.rb', line 48

def clean
  with_cli_errors do
    Commands::Clean.new.call(config_path: options[:config], logica_bin_override: options[:logica_bin])
  end
end

#compile(name = nil) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
# File 'lib/logica_compiler/cli.rb', line 35

def compile(name = nil)
  with_cli_errors do
    Commands::Compile.new.call(
      config_path: options[:config],
      logica_bin_override: options[:logica_bin],
      name:,
      force: options[:force],
      prune: options[:prune]
    )
  end
end

#installObject



25
26
27
28
29
30
# File 'lib/logica_compiler/cli.rb', line 25

def install
  with_cli_errors do
    version = Commands::Install.new.call(config_path: options[:config], logica_bin_override: options[:logica_bin])
    say version, :green
  end
end

#versionObject



62
63
64
65
66
# File 'lib/logica_compiler/cli.rb', line 62

def version
  with_cli_errors do
    say Commands::Version.new.call(config_path: options[:config], logica_bin_override: options[:logica_bin])
  end
end

#watchObject



55
56
57
58
59
# File 'lib/logica_compiler/cli.rb', line 55

def watch
  with_cli_errors do
    Commands::Watch.new.call(config_path: options[:config], logica_bin_override: options[:logica_bin])
  end
end