Class: Pod::Command::Lib::Create

Inherits:
Pod::Command::Lib show all
Extended by:
Executable
Defined in:
lib/cocoapods/command/lib.rb

Overview

———————————————————————–#

Instance Method Summary collapse

Methods included from Executable

executable, execute_command

Methods inherited from Pod::Command

options, parse, report_error, run, verify_git_version!

Methods included from Pod::Config::Mixin

#config

Constructor Details

#initialize(argv) ⇒ Create



24
25
26
27
28
# File 'lib/cocoapods/command/lib.rb', line 24

def initialize(argv)
  @name = argv.shift_argument
  @template_url = argv.shift_argument
  super
end

Instance Method Details

#runObject



37
38
39
40
41
# File 'lib/cocoapods/command/lib.rb', line 37

def run
  clone_template
  configure_template
  print_info
end

#validate!Object



30
31
32
33
34
35
# File 'lib/cocoapods/command/lib.rb', line 30

def validate!
  super
  help! 'A name for the Pod is required.' unless @name
  help! 'The Pod name cannot contain spaces.' if @name.match(/\s/)
  help! "The Pod name cannot begin with a '.'" if @name[0, 1] == '.'
end