lib/ryonan/interactive.rb in ryonan-0.0.1 vs lib/ryonan/interactive.rb in ryonan-0.0.2
- old
+ new
@@ -1,6 +1,7 @@
require 'readline'
+require 'active_support/core_ext/string/strip'
module Ryonan
module Interactive
class << self
def print_template_list(filer)
@@ -20,10 +21,15 @@
exit 1
end
end
def read_template_name
- name = Readline.readline('Input the destination directory name -> ')
+ name = Readline.readline(<<-'EOS'.strip_heredoc.chomp + ' ')
+ Input the destination directory name
+ ( Deprecated: If the input is blank, to expand the template directory on one level up )
+ ->
+ EOS
+
if name == Config.template_dir_name
puts "#{Config.template_dir_name} will overlap with the template directory name"
exit 1
else
name
\ No newline at end of file