class Prek::PrekManager::Lib::Create
Public Class Methods
new(params)
click to toggle source
Calls superclass method
# File lib/command/lib/create.rb, line 11 def initialize(params) @projectName = params.shift_argument @components = params.option('components','optional') @prefix = params.option('prefix','Prek') @platform = params.flag?('platform',true) super end
options()
click to toggle source
# File lib/command/lib/create.rb, line 7 def self.options end
Public Instance Methods
run()
click to toggle source
Calls superclass method
Prek::PrekManager::Lib#run
# File lib/command/lib/create.rb, line 31 def run super parameter = [@projectName, '--template-url=https://github.com/CocoaPods/pod-template.git'] finalParams = CLAide::ARGV.new(parameter) Pod::Command::Lib::Create.new(finalParams).run end
validate!()
click to toggle source
Calls superclass method
# File lib/command/lib/create.rb, line 19 def validate! super if @components && !%w(none optional all).include?(@components) help! "`#{@components}' 参数无效,components = none 或 optional 或 all " end if !@projectName help! "参数错误,需要输入项目名称,bytedance lib create projectName" end end