Sha256: c7f2ca0841b88bcf89518fc82785c3ea20ea5cb68a458c0400814fcd851d722d
Contents?: true
Size: 521 Bytes
Versions: 1
Compression:
Stored size: 521 Bytes
Contents
module SwitchDb class Cli class << self def run!(command, arguments = {}) command_class = command_for(command) reference_set = ReferenceSet.load_from_directory(SwitchDb.configuration.cache_dir) command_class.new(reference_set: reference_set).run(arguments) end private def command_for(command) Command.const_get(Utils.classify(command.to_s)) rescue NameError raise CommandNotFound, "#{command} is unknown command." end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
switch_db-0.1.1 | lib/switch_db/cli.rb |