Class: Pow::Parser

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

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Parser

Returns a new instance of Parser.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/pow.rb', line 8

def initialize args
  command = args.delete_at 0
  case command
  when 'add'
    Add.new *args
  when 'remove'
    Remove.new *args
  when 'open'
    Open.new *args
  when 'restart'
    Restart.new *args
  else
    puts Pow::USAGE
  end
end