Class: Magi::Command
- Inherits:
-
Object
- Object
- Magi::Command
- Defined in:
- lib/magi/command.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(argv) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(argv) ⇒ Command
Returns a new instance of Command.
20 21 22 |
# File 'lib/magi/command.rb', line 20 def initialize(argv) @argv = argv end |
Class Method Details
.call(*args) ⇒ Object
16 17 18 |
# File 'lib/magi/command.rb', line 16 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/magi/command.rb', line 24 def call case name when "setup" setup when "start" start else puts "Usage: magi {setup|start}" end end |