Class: Libyear::CLI

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

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CLI

Returns a new instance of CLI.



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

def initialize(argv)
  deprecate
  validate_arguments(argv)
  @gemfile_path = argv.first
end

Instance Method Details

#runObject



14
15
16
# File 'lib/libyear/cli.rb', line 14

def run
  print Report.new(Query.new(@gemfile_path).execute).to_s
end