Module: Mundane::Prompter
Instance Method Summary
collapse
Methods included from FileWorker
count_targeted_files, get_files_in_current_folder, make_output_directory
Instance Method Details
16
17
18
|
# File 'lib/mundane/prompter.rb', line 16
def construct_informative_message(prompt)
prompt.sub("%count_targeted_files%", count_targeted_files.to_s)
end
|
#prompt_user(prompt) ⇒ Object
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/mundane/prompter.rb', line 5
def prompt_user(prompt)
puts construct_informative_message(prompt)
proceed = STDIN.gets.strip.downcase
if proceed == "y" or proceed == "yes" or proceed == ""
true
else
false
end
end
|