Sha256: 15afae61a2587436cb99b15b5ad4d2a6a56c9558e5f330f038079263de6fcc69

Contents?: true

Size: 442 Bytes

Versions: 22

Compression:

Stored size: 442 Bytes

Contents

require "vmc/cli/space/base"

module VMC::Space
  class Take < Base
    desc "Switch to a space, creating it if it doesn't exist"
    group :spaces, :hidden => true
    input :name, :desc => "Space name", :argument => true
    def take_space
      if space = client.space_by_name(input[:name])
        invoke :target, :space => space
      else
        invoke :create_space, :name => input[:name], :target => true
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
af-0.5.0.beta.11 lib/vmc/cli/space/take.rb
af-0.5.0.beta.10 lib/vmc/cli/space/take.rb
af-0.5.0.beta.9 lib/vmc/cli/space/take.rb
af-0.5.0.beta.8 lib/vmc/cli/space/take.rb
af-0.5.0.beta.7 lib/vmc/cli/space/take.rb
af-0.5.0.beta.6 lib/vmc/cli/space/take.rb
af-0.5.0.beta.5 lib/vmc/cli/space/take.rb
af-0.5.0.beta.4 lib/vmc/cli/space/take.rb
af-0.5.0.beta.3 lib/vmc/cli/space/take.rb
af-0.5.0.beta.2 lib/vmc/cli/space/take.rb
af-0.5.0.beta.1 lib/vmc/cli/space/take.rb
vmc-0.5.0.rc1 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.12 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.11 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.10 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.7 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.6 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.5 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.4 lib/vmc/cli/space/take.rb
vmc-0.5.0.beta.3 lib/vmc/cli/space/take.rb