Class: Vbuilder::Generator::Application
- Inherits:
-
Object
- Object
- Vbuilder::Generator::Application
- Extended by:
- Shellwords
- Defined in:
- lib/vbuilder/generator/application.rb
Class Method Summary collapse
Class Method Details
.build_options(arguments) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/vbuilder/generator/application.rb', line 34 def (arguments) env_opts_string = ENV['VBUILDER_OPTS'] || "" env_opts = Vbuilder::Generator::Options.new(shellwords(env_opts_string)) argument_opts = Vbuilder::Generator::Options.new(arguments) env_opts.merge(argument_opts) end |
.run!(*arguments) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/vbuilder/generator/application.rb', line 9 def run!(*arguments) = (arguments) if [:invalid_argument] $stderr.puts [:invalid_argument] [:show_help] = true end if [:show_version] $stderr.puts "Version: #{Vbuilder::Version.version}" return 1 end if [:show_help] $stderr.puts .opts return 1 end begin generator = Vbuilder::Generator.new() generator.run return 0 end end |