Class: Hipmost::CLI

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

Class Method Summary collapse

Class Method Details

.run(command, args, options) ⇒ Object



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

def self.run(command, args, options)
  case command.to_sym
  when :public, :room, :rooms
    Hipmost::Cmds::Room.new(**options).run(args)
  when :private, :direct
    Hipmost::Cmds::Private.new(**options).run(args)
  else
    puts "Invalid command"
    exit 1
  end
end