Class: Messiah::Generator::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/messiah/generator/application.rb

Class Method Summary collapse

Class Method Details

.run!(*args) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/messiah/generator/application.rb', line 2

def self.run!(*args)
  options = Messiah::Generator::Options.new(args)

  if options[:invalid_argument]
    $stderr.puts options[:invalid_argument]
    options[:show_help] = true
  end

  if options[:show_help]
    $stderr.puts options.opts
    return 1
  end
  
  generator = Messiah::Generator.new(options)
  generator.run!
  return 0
end