Class: Pod::Command::Spm::Fetch
- Inherits:
-
Pod::Command::Spm
- Object
- Pod::Command
- Pod::Command::Spm
- Pod::Command::Spm::Fetch
- Defined in:
- lib/cocoapods-spm/command/fetch.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Fetch
constructor
A new instance of Fetch.
- #run ⇒ Object
Methods inherited from Pod::Command::Spm
Methods included from SPM::Config::Mixin
Constructor Details
#initialize(argv) ⇒ Fetch
Returns a new instance of Fetch.
15 16 17 18 19 20 21 |
# File 'lib/cocoapods-spm/command/fetch.rb', line 15 def initialize(argv) super update_cli_config( all: argv.flag?("all"), macros: argv.option("macros", "").split(",") ) end |
Class Method Details
.options ⇒ Object
8 9 10 11 12 13 |
# File 'lib/cocoapods-spm/command/fetch.rb', line 8 def self. [ ["--all", "Prebuild all macros"], ["--macros=foo", "Macros to prebuild, separated by comma (,)"], ].concat(super) end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 |
# File 'lib/cocoapods-spm/command/fetch.rb', line 23 def run spm_config.macros.each do |name| SPM::MacroFetcher.new(name: name, can_cache: true).run end end |