Sha256: 09c8266ff6fc7e1a331136d9cfac095185a441e9123adf75cd87cce8c3c49b2f
Contents?: true
Size: 850 Bytes
Versions: 7
Compression:
Stored size: 850 Bytes
Contents
require 'optparse' module RoboPigeon::Extensions class Cli class << self def invoke(args) template = 'default' path = FileUtils.pwd optparse = OptionParser.new do |opts| opts.banner = 'Usage: robopigeon new [options] name' opts.on('-d', '--default', 'use the default template') do template = 'default' end opts.on('-h', '--help', 'Show help message') do puts opts exit 1 end opts.on('-p', '--path [path]', 'path to where the gem should be created') do |selected_path| path = selected_path end end args.shift options = optparse.parse(args) name = options.shift RoboPigeon::Extensions::Template.render(name, path, template) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems