Module | Beetle::Commands |
In: |
lib/beetle/commands/configuration_client.rb
lib/beetle/commands/configuration_server.rb lib/beetle/commands.rb |
invokes given command by instantiating an appropriate command class
# File lib/beetle/commands.rb, line 7 7: def self.execute(command) 8: if commands.include? command 9: require File.expand_path("../commands/#{command}", __FILE__) 10: "Beetle::Commands::#{command.classify}".constantize.execute 11: else 12: # me no likez no frikin heredocs 13: puts "\nCommand #{command} not known\n" if command 14: puts "Available commands are:" 15: puts 16: commands.each {|c| puts "\t #{c}"} 17: puts 18: exit 1 19: end 20: end