Sha256: b37c0bd86ad21caa0db6558d9ecf5d3339d978acbe78b37895a162643c2257b9

Contents?: true

Size: 834 Bytes

Versions: 5

Compression:

Stored size: 834 Bytes

Contents

module Coral
  module Vagrant
    module SubCommand
      class CoralRemove < ::Vagrant.plugin('2', :command)

        #-----------------------------------------------------------------------
        # Execution
        
        def execute
          options = {}
          success = true

          opts = OptionParser.new do |opts|
            opts.banner = 'Usage: coral rm -h {name} [ {type} ]'
            opts.separator ''

          end

          #---

          args = parse_options(opts)
          return unless args

          raise ::Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if args.length < 1

          project_name = args[0]
          project_type = ( args.size < 2 ? 'module' : args[1] )

          #---------
          # Start

          exit success ? 0 : 1
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
coral_vagrant-0.2.8 lib/coral_vagrant/commands/coral/rm.rb
coral_vagrant-0.2.5 lib/coral_vagrant/commands/coral/rm.rb
coral_vagrant-0.2.4 lib/coral_vagrant/commands/coral/rm.rb
coral_vagrant-0.2.3 lib/coral_vagrant/commands/coral/rm.rb
coral_vagrant-0.2.2 lib/coral_vagrant/commands/coral/rm.rb