Sha256: 6092a74bec4a286f6520d987ad26ca391d30dd285a3fbad532a68ce516114706

Contents?: true

Size: 696 Bytes

Versions: 3

Compression:

Stored size: 696 Bytes

Contents

module Pbmenv
  class CLI
    def self.run(argv)
      sub_command = argv[0]
      case sub_command
      when 'available_versions', 'av'
        Pbmenv.available_versions.each { |x| puts x }
      when 'versions', 'list'
        Pbmenv.versions.each { |x| puts x }
      when 'install', 'i'
        sub_command_arg = argv[1]
        Pbmenv.install(sub_command_arg)
      when 'uninstall'
        sub_command_arg = argv[1]
        Pbmenv.uninstall(sub_command_arg)
      when '--version'
        puts Pbmenv::VERSION
      else
        puts <<~EOH
          Unknown command:
            available commands: available_versions, versions, install, uninstall
        EOH
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pbmenv-0.1.5 lib/pbmenv/cli.rb
pbmenv-0.1.4 lib/pbmenv/cli.rb
pbmenv-0.1.3 lib/pbmenv/cli.rb