Class: Rodiff::CLI
- Inherits:
-
Thor
- Object
- Thor
- Rodiff::CLI
- Defined in:
- lib/rodiff/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
39 40 41 |
# File 'lib/rodiff/cli.rb', line 39 def self.exit_on_failure? true end |
Instance Method Details
#compare(baseline = nil, variant = nil, diff = nil) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/rodiff/cli.rb', line 30 def compare(baseline = nil, variant = nil, diff = nil) all_present, all_absent = args_presence(baseline, variant, diff) raise ArgumentError, "BASELINE, VARIANT, DIFF must be provided" unless all_present ^ all_absent odiff_exec(baseline, variant, diff) rescue Rodiff::Error => e raise Thor::Error, "ERROR: #{e.}" end |