lib/pdk/cli/new/class.rb in pdk-0.2.0 vs lib/pdk/cli/new/class.rb in pdk-0.3.0
- old
+ new
@@ -1,15 +1,16 @@
-
module PDK::CLI
@new_class_cmd = @new_cmd.define_command do
name 'class'
usage _('class [options] <class_name> [parameter[:type]] [parameter[:type]] ...')
summary _('Create a new class named <class_name> using given options')
PDK::CLI.template_url_option(self)
run do |opts, args, _cmd|
require 'pdk/generators/puppet_class'
+
+ PDK::CLI::Util.ensure_in_module!
class_name = args[0]
module_dir = Dir.pwd
if class_name.nil? || class_name.empty?