Class: Pod::Command::Lib::Create
- Inherits:
-
Pod::Command::Lib
- Object
- CLAide::Command
- Pod::Command
- Pod::Command::Lib
- Pod::Command::Lib::Create
- Extended by:
- Executable
- Defined in:
- lib/cocoapods/command/lib.rb
Overview
———————————————————————–#
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Create
constructor
A new instance of Create.
- #run ⇒ Object
- #validate! ⇒ Object
Methods included from Executable
executable, execute_command, which
Methods inherited from Pod::Command
#ensure_master_spec_repo_exists!, report_error, run
Methods included from Pod::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Create
Returns a new instance of Create.
30 31 32 33 34 35 |
# File 'lib/cocoapods/command/lib.rb', line 30 def initialize(argv) @name = argv.shift_argument @template_url = argv.option('template-url', TEMPLATE_REPO) super @additional_args = argv.remainder! end |
Class Method Details
.options ⇒ Object
23 24 25 26 27 28 |
# File 'lib/cocoapods/command/lib.rb', line 23 def self. [ ['--template-url=URL', 'The URL of the git repo containing a ' \ 'compatible template'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
44 45 46 47 48 |
# File 'lib/cocoapods/command/lib.rb', line 44 def run clone_template configure_template print_info end |
#validate! ⇒ Object
37 38 39 40 41 42 |
# File 'lib/cocoapods/command/lib.rb', line 37 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 |