class YJCocoa::PodLib

Usage

Attributes

create[RW]

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/yjcocoa/pod/pod_lib.rb, line 27
def initialize(argv)
    super
    self.create = argv.option('create')
end
options() click to toggle source
Calls superclass method YJCocoa::Command::options
# File lib/yjcocoa/pod/pod_lib.rb, line 21
def self.options
    [['--create', 'Creates a new Pod'],] + super
end

Public Instance Methods

run() click to toggle source
# File lib/yjcocoa/pod/pod_lib.rb, line 40
def run
    puts "YJCocoa create pod lib #{self.create}".green            
    system("pod lib create --template-url=git@github.com:937447974/pod-template.git #{self.create}")
end
validate!() click to toggle source
Calls superclass method
# File lib/yjcocoa/pod/pod_lib.rb, line 32
def validate!
    super
    unless self.create && !self.create.empty?
        puts "库名为空".red
        self.banner!
    end
end