Class: LibyearRb::CLI
- Inherits:
-
Object
- Object
- LibyearRb::CLI
- Defined in:
- lib/libyear_rb/cli.rb
Instance Method Summary collapse
-
#initialize(argv = ARGV) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/libyear_rb/cli.rb', line 19 def run LibyearRb.logger = Logger.new($stderr) if @options[:verbose] lockfile_contents = read_lockfile results = Runner.new.run(lockfile_contents, as_of: @options[:as_of]) sorted_results = Sorter.sort(results, @options.fetch(:sorters)) @options.fetch(:formatter).new(indirect: @options.fetch(:indirect)).generate(sorted_results) end |