Class: PureMVCGen::Commands::NewCommand::CreateProxy

Inherits:
CmdParse::Command show all
Defined in:
lib/pure_m_v_c_gen/commands/new_command.rb

Instance Method Summary collapse

Methods inherited from CmdParse::Command

#default_options

Constructor Details

#initializeCreateProxy

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.options = default_options 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