Module: Pod::Command::Options::ProjectDirectory
- Defined in:
- lib/cocoapods/command/options/project_directory.rb
Overview
Provides support for commands to take a user-specified ‘project directory`
Defined Under Namespace
Modules: Options
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
15 16 17 |
# File 'lib/cocoapods/command/options/project_directory.rb', line 15 def self.included(base) base.extend(Options) end |
Instance Method Details
#initialize(argv) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/cocoapods/command/options/project_directory.rb', line 19 def initialize(argv) if project_directory = argv.option('project-directory') @project_directory = Pathname.new(project_directory). end config.installation_root = @project_directory super end |
#validate! ⇒ Object
27 28 29 30 31 32 |
# File 'lib/cocoapods/command/options/project_directory.rb', line 27 def validate! super if @project_directory && !@project_directory.directory? raise Informative, "`#{@project_directory}` is not a valid directory." end end |