Class: Pod::Command::Spm::Macro::Fetch
- Inherits:
-
Pod::Command::Spm::Macro
- Object
- Pod::Command
- Pod::Command::Spm
- Pod::Command::Spm::Macro
- Pod::Command::Spm::Macro::Fetch
- Defined in:
- lib/cocoapods-spm/command/macro/fetch.rb
Constant Summary
Constants inherited from Pod::Command::Spm
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
bind_command, #update_cli_config
Methods included from SPM::Config::SPMConfigMixin
Methods included from SPM::Config::PodConfigMixin
Methods included from SPM::Config::ProjectConfigMixin
Constructor Details
#initialize(argv) ⇒ Fetch
Returns a new instance of Fetch.
16 17 18 19 20 21 22 |
# File 'lib/cocoapods-spm/command/macro/fetch.rb', line 16 def initialize(argv) super update_cli_config( all: argv.flag?("all"), macros: argv.option("macros", "").split(",") ) end |
Class Method Details
.options ⇒ Object
9 10 11 12 13 14 |
# File 'lib/cocoapods-spm/command/macro/fetch.rb', line 9 def self. [ ["--all", "Prebuild all macros"], ["--macros=foo", "Macros to prebuild, separated by comma (,)"], ].concat(super) end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 |
# File 'lib/cocoapods-spm/command/macro/fetch.rb', line 24 def run spm_config.macros.each do |name| SPM::MacroFetcher.new(name: name, can_cache: true).run end end |