Class: Vermillion::Controller::Create
- Includes:
- Helper::ApiCommunication
- Defined in:
- lib/client/controller/create.rb
Constant Summary
Constants inherited from Base
Base::OK, Base::QUIT, Base::QUIT_SOFT
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#one(server, name = nil) ⇒ Object
- Create a new project on the requested server
server
- Symbol representing the server you want to access
name
-
Optional symbol, the name of the project.
- Symbol representing the server you want to access
- Create a new project on the requested server
-
#pre_exec ⇒ Object
Prepare to execute the requested method.
Methods included from Helper::ApiCommunication
Methods inherited from Base
#can_exec?, #exec, #initialize, #post_exec, #sample
Constructor Details
This class inherits a constructor from Vermillion::Controller::Base
Instance Method Details
#one(server, name = nil) ⇒ Object
Create a new project on the requested server
server
-
Symbol representing the server you want to access
name
-
Optional symbol, the name of the project
20 21 22 23 |
# File 'lib/client/controller/create.rb', line 20 def one(server, name = nil) @name = name || @name send_to_one(server, :create, name: @name) end |
#pre_exec ⇒ Object
Prepare to execute the requested method
7 8 9 10 11 12 13 14 15 |
# File 'lib/client/controller/create.rb', line 7 def pre_exec OptionParser.new do |opt| opt. = "vermillion create [...-flags]" opt.on("-n", "--name=NAME", "Directory to be created") { |o| @name = o } end.parse! super end |