Class: Ghostbuster::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/ghostbuster/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Runner

Returns a new instance of Runner.



3
4
5
# File 'lib/ghostbuster/runner.rb', line 3

def initialize(args)
  @args = args
end

Instance Method Details

#runObject



7
8
9
10
11
12
13
14
15
# File 'lib/ghostbuster/runner.rb', line 7

def run
  if @args.size == 1 && @args.first == /^--?[\?h](|elp)$/i or @args.size > 1
    puts "ghostbuster [path/to/Ghostfile]"
    puts "  Version #{VERSION}"
    exit(0)
  else
    exit Ghostbuster.new(@args.first).run
  end
end