Class: Jets::CLI::Waf::Init

Inherits:
Group::Base show all
Includes:
Util::Sure
Defined in:
lib/jets/cli/waf/init.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Group::Helpers

#class_name, #framework, #init_project_name, #package_type, #underscore_name

Methods included from Group::Actions

#comment_out_line, #config_environment, #environment, #optimize_indentation

Class Method Details

.cli_optionsObject



5
6
7
8
9
10
# File 'lib/jets/cli/waf/init.rb', line 5

def self.cli_options
  [
    [:force, aliases: :f, type: :boolean, desc: "Bypass overwrite are you sure prompt for existing files"],
    [:yes, aliases: :y, type: :boolean, desc: "Skip are you sure prompt"]
  ]
end

Instance Method Details

#are_you_sure?Boolean

Returns:

  • (Boolean)


30
31
32
33
# File 'lib/jets/cli/waf/init.rb', line 30

def are_you_sure?
  return if options[:yes]
  sure?(sure_message)
end

#config_jets_ciObject



36
37
38
# File 'lib/jets/cli/waf/init.rb', line 36

def config_jets_ci
  template "waf.rb.tt", "config/jets/waf.rb"
end