Class: Altria::Command

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Command

Returns a new instance of Command.



20
21
22
# File 'lib/altria/command.rb', line 20

def initialize(argv)
  @argv = argv
end

Class Method Details

.call(*args) ⇒ Object



16
17
18
# File 'lib/altria/command.rb', line 16

def self.call(*args)
  new(*args).call
end

Instance Method Details

#callObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/altria/command.rb', line 24

def call
  case name
  when "setup"
    setup
  when "start"
    start
  else
    puts "Usage: altria {setup|start}"
  end
end