Class: WB::CLI
- Inherits:
-
Object
- Object
- WB::CLI
- Defined in:
- lib/wb/cli.rb
Instance Method Summary collapse
-
#initialize(commands) ⇒ CLI
constructor
A new instance of CLI.
- #run(arguments: ARGV) ⇒ Object
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 |