Class: Yadtfp::CLI
- Inherits:
-
Thor
- Object
- Thor
- Yadtfp::CLI
- Defined in:
- lib/yadtfp/cli.rb
Instance Method Summary collapse
Instance Method Details
#diff(file1, file2) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/yadtfp/cli.rb', line 29 def diff(file1, file2) # Load config config = Yadtfp::Configuration.() # Parse parser = Yadtfp::ParsersFactory.create(config.parser) left = parser.parse(file1) right = parser.parse(file2) # Diff diff = parser.diff(left, right) # Output out = Yadtfp::OutputtersFactory.create(config.outputter, diff) out.print end |