Sha256: 697cc7434043e9d9190b168f687a68aec81940003249605770a0af3f08a48eab
Contents?: true
Size: 815 Bytes
Versions: 1
Compression:
Stored size: 815 Bytes
Contents
module DemoInstaller def proceed(target,source,banner) options = { } options[:target]="#{target}" OptionParser.new do |opts| opts.banner =banner +<<END Command syntax: ---------- END opts.on("-t","--target DIRECTORY","","target directory where demo project will be installed","default: --target #{options[:target]}" ) do |v| options[:target] = v end # No argument, shows at tail. This will print an options summary. # Try it and see! opts.on_tail("-h", "--help", "Show this message") do puts opts exit end end.parse! if File.exist?(options[:target]) puts "WARNING: File already exists (#{options[:target]})" puts "WARNING: Copy aborted" else cp_r("#{source}", options[:target] ) puts "INFO: Project created in #{options[:target]}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ontomde-core-1.0.2 | lib/ontomde-core/demoInstaller.rb |