3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/absolute_renamer/external/parsers/interactive/parser.rb', line 3
def self.add_options(parser, options)
parser.on('-i', 'Prompt before each renamming') do
options[:interactive] = :always
end
parser.on('-I', 'Prompt once before batch renamming') do
options[:interactive] = :once
end
parser.on('--interactive [WHEN]', [:always, :never, :once],
'Prompt according to WHEN: never, once (-I), or always (-i).',
'Without WHEN, prompt always') do |w|
w = :always if w.nil?
options[:interactive] = w
end
end
|