Class: Abaddon::Runner

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

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Runner

Returns a new instance of Runner.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/abaddon/runner.rb', line 9

def initialize(args)
  case args.first
  when 'help', '-h', '--help'
    Abaddon::Help.display
  when 'version', '-v', '--version'
    puts Abaddon::Information.version
  when 'new', 'create'
    Abaddon::Help.message :not_found unless Abaddon.load args[1..args.size]
  else
    Abaddon::Help.display
  end
end