Sha256: f9191078b0be78ed52d96ce386cdc252619762056d24b0e1bd61adbb19b8024e

Contents?: true

Size: 596 Bytes

Versions: 2

Compression:

Stored size: 596 Bytes

Contents

require 'trollop'
require 'sdbport/cli/export'
require 'sdbport/cli/import'
require 'sdbport/cli/purge'

module Sdbport
  class CLI

    def start

      cmd = ARGV.shift

      case cmd
      when 'export'
        CLI::Export.new.export
      when 'import'
        CLI::Import.new.import
      when 'purge'
        CLI::Purge.new.purge
      when '-v'
        puts Sdbport::VERSION
      else
        puts "Unkown command: '#{cmd}'." unless cmd == '-h'
        puts "sdbport [export|import|purge] OPTIONS"
        puts "Append -h for help on specific subcommand."
      end
 
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sdbport-0.1.1 lib/sdbport/cli.rb
sdbport-0.1.0 lib/sdbport/cli.rb