Class: Bundler::AutoUpdate::CLI

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

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CLI

Returns a new instance of CLI.



6
7
8
# File 'lib/bundler_auto_update.rb', line 6

def initialize(argv)
  @argv = argv
end

Instance Method Details

#run!Object



10
11
12
# File 'lib/bundler_auto_update.rb', line 10

def run!
  Updater.new(test_command).auto_update!
end

#test_commandString

Returns Test command from @argv.

Returns:

  • (String)

    Test command from @argv



15
16
17
18
19
# File 'lib/bundler_auto_update.rb', line 15

def test_command
  if @argv.first == '-c'
    @argv[1..-1].join(' ')
  end
end