Class: WB::CLI

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

Instance Method Summary collapse

Constructor Details

#initialize(commands) ⇒ CLI

Returns a new instance of CLI.



3
4
5
# File 'lib/wb/cli.rb', line 3

def initialize(commands)
  @commands = commands
end

Instance Method Details

#run(arguments: ARGV) ⇒ Object



7
8
9
10
# File 'lib/wb/cli.rb', line 7

def run(arguments: ARGV)
  command = find_command(arguments[0])
  command.run(arguments[1])
end