class Pod::Command::Dev::Create
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
# File lib/cocoapods-extension/command/development/create.rb, line 20 def initialize(argv) @name = argv.shift_argument super end
Public Instance Methods
run()
click to toggle source
# File lib/cocoapods-extension/command/development/create.rb, line 25 def run project_name = @name target_url = File.join(Dir::pwd, project_name) configure_url = Pod::Extension::Sandbox::workspace::template::configure template_url = Pod::Extension::Sandbox::workspace::template::ios_template if Dir::exist?(target_url) && !Dir::empty?(target_url) UI.puts "fatal: destination path '#{project_name}' already exists and is not an empty directory.".red else rm! ['-rf', target_url] if !template_url.exist? Pod::Extension::Sandbox::update! end UI.section("Configuring #{project_name} template.") do system('ruby', configure_url.to_s, template_url.to_s, target_url.to_s, project_name.to_s) end end end