Class: Decent::Hodling

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

Class Method Summary collapse

Class Method Details

.execute(args) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/decent/command/hodling/hodling.rb', line 3

def self.execute(args)
  command  = args.first
  commands = {
    "add"    => AddHodling,
    "list"   => ListHodling,
    "remove" => RemoveHodling,
    "show"   => ShowHodling,
    "update" => UpdateHodling
  }

  commands[command].execute args
end