Class: PureMVCGen::Commands::NewCommand::CreateProxy
- Inherits:
-
CmdParse::Command
- Object
- CmdParse::Command
- PureMVCGen::Commands::NewCommand::CreateProxy
- Defined in:
- lib/pure_m_v_c_gen/commands/new_command.rb
Instance Method Summary collapse
- #execute(args) ⇒ Object
-
#initialize ⇒ CreateProxy
constructor
A new instance of CreateProxy.
Methods inherited from CmdParse::Command
Constructor Details
#initialize ⇒ CreateProxy
Returns a new instance of CreateProxy.
67 68 69 70 71 72 73 |
# File 'lib/pure_m_v_c_gen/commands/new_command.rb', line 67 def initialize super('proxy', false) self.short_desc = "Creates a new proxy." self. = do |opt| opt.on("-n", "--name PROXY_NAME", "Specifies the name for the proxy") { |name| @proxy_name = name } end end |
Instance Method Details
#execute(args) ⇒ Object
75 76 77 78 79 80 |
# File 'lib/pure_m_v_c_gen/commands/new_command.rb', line 75 def execute(args) cmd = "" cmd << "-Dproxy.name=#{@proxy_name} " unless @proxy_name.nil? cmd << "create-proxy" call_ant cmd end |