Class: ZedTestToggle::CLI

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

Overview

CLI class for ontology translator

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/zed_test_toggle/cli/cli.rb', line 15

def self.exit_on_failure?
  true
end

.startObject



8
9
10
11
12
13
# File 'lib/zed_test_toggle/cli/cli.rb', line 8

def self.start(*)
  super
rescue Thor::InvocationError, ArgumentError, Errno::ENOENT, IOError => exc
  warn String(exc)
  exit(1)
end

Instance Method Details

#lookupObject



22
23
24
25
# File 'lib/zed_test_toggle/cli/cli.rb', line 22

def lookup
  alternate_file = SourceFile.new(options[:path], root: options[:root]).alternate_file
  system("zed", alternate_file) unless alternate_file.nil?
end