Class: Glossarist::CLI::CompareCommand
- Inherits:
-
Object
- Object
- Glossarist::CLI::CompareCommand
- Defined in:
- lib/glossarist/cli/compare_command.rb
Instance Method Summary collapse
-
#initialize(new_path, old_path, options) ⇒ CompareCommand
constructor
A new instance of CompareCommand.
- #run ⇒ Object
Constructor Details
#initialize(new_path, old_path, options) ⇒ CompareCommand
Returns a new instance of CompareCommand.
8 9 10 11 12 |
# File 'lib/glossarist/cli/compare_command.rb', line 8 def initialize(new_path, old_path, ) @new_path = new_path @old_path = old_path @options = end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/glossarist/cli/compare_command.rb', line 14 def run new_concepts = ConceptCollector.collect(@new_path) old_concepts = ConceptCollector.collect(@old_path) result = ConceptComparator.new( new_concepts: new_concepts, old_concepts: old_concepts, ).compare(show_diffs: !@options[:no_diffs]) report(result) end |