Sha256: b90015bf595df84e89bb05d60a2ca64fc46e4667f02270661f40bc18119413b1
Contents?: true
Size: 822 Bytes
Versions: 14
Compression:
Stored size: 822 Bytes
Contents
require 'oscar/skeleton' class Oscar::Command::Init < Vagrant.plugin('2', :command) include Oscar::Command::Helpers def initialize(argv, env) @argv = argv @env = env @cmd_name = 'oscar init' @provider = nil split_argv end def execute argv = parse_options(parser) skeleton = Oscar::Skeleton.new(@env, @provider) skeleton.generate @env.ui.info I18n.t('oscar.command.init.default') end private def parser OptionParser.new do |o| o.banner = "Usage: vagrant #{@cmd_name} [<args>]" o.separator '' o.on('-p', '--provider=val', String, 'The Vagrant provider type to template') do |val| @provider = val end o.on('-h', '--help', 'Display this help message') do puts o exit 0 end end end end
Version data entries
14 entries across 14 versions & 1 rubygems