Class: Pod::Command::Binary::Lib::Create
- Inherits:
-
Pod::Command::Binary::Lib
- Object
- Pod::Command
- Pod::Command::Binary
- Pod::Command::Binary::Lib
- Pod::Command::Binary::Lib::Create
- Defined in:
- lib/cocoapods-tdfire-binary/command/lib/create.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Create
constructor
A new instance of Create.
- #run ⇒ Object
- #validate! ⇒ Object
Methods inherited from Pod::Command::Binary
#binary_config, #first_podspec, #private_sources
Constructor Details
#initialize(argv) ⇒ Create
Returns a new instance of Create.
18 19 20 21 |
# File 'lib/cocoapods-tdfire-binary/command/lib/create.rb', line 18 def initialize(argv) @name = argv.shift_argument super end |
Instance Method Details
#run ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/cocoapods-tdfire-binary/command/lib/create.rb', line 28 def run argvs = [ "--template-url=#{Pod::Tdfire::BinaryUrlManager.template_lib_url}", @name ] create = Pod::Command::Lib::Create.new(CLAide::ARGV.new(argvs)) create.validate! create.run end |
#validate! ⇒ Object
23 24 25 26 |
# File 'lib/cocoapods-tdfire-binary/command/lib/create.rb', line 23 def validate! super help! "必须提供有效组件名称" if @name.nil? end |