Class: TestChanges::ARGVWrapper

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ ARGVWrapper

Returns a new instance of ARGVWrapper.



5
6
7
# File 'lib/test_changes/argv_wrapper.rb', line 5

def initialize(argv)
  @argv = argv
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



3
4
5
# File 'lib/test_changes/argv_wrapper.rb', line 3

def argv
  @argv
end

Instance Method Details

#commitObject



9
10
11
# File 'lib/test_changes/argv_wrapper.rb', line 9

def commit
  slop_options[:commit]
end

#runner_call_optionsObject



13
14
15
16
17
18
19
20
21
# File 'lib/test_changes/argv_wrapper.rb', line 13

def runner_call_options
  runner_call_options_delimiter_index = argv.index('--')

  if runner_call_options_delimiter_index
    argv.slice(runner_call_options_delimiter_index + 1, argv.size)
  else
    []
  end
end

#runner_nameObject



23
24
25
# File 'lib/test_changes/argv_wrapper.rb', line 23

def runner_name
  slop_options[:runner]
end

#verbose?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/test_changes/argv_wrapper.rb', line 27

def verbose?
  !slop_options.quiet?
end