Sha256: 1a542c9c9ba36446a47cd40c7c41263defd3f4ec7b83c5b925fc93ef2ffdc881
Contents?: true
Size: 819 Bytes
Versions: 26
Compression:
Stored size: 819 Bytes
Contents
require "vmc/cli/organization/base" module VMC::Organization class Create < Base desc "Create an organization" group :organizations input :name, :desc => "Organization name", :argument => :optional input :target, :desc => "Switch to the organization after creation", :alias => "-t", :default => true input :add_self, :desc => "Add yourself to the organization", :default => true def create_org org = client.organization org.name = input[:name] org.users = [client.current_user] if input[:add_self] with_progress("Creating organization #{c(org.name, :name)}") do org.create! end if input[:target] invoke :target, :organization => org end end private def ask_name ask("Name") end end end
Version data entries
26 entries across 26 versions & 2 rubygems