Class: Pod::Command::Spm::Macro::Prebuild
- Inherits:
-
Pod::Command::Spm::Macro
- Object
- Pod::Command
- Pod::Command::Spm
- Pod::Command::Spm::Macro
- Pod::Command::Spm::Macro::Prebuild
- Defined in:
- lib/cocoapods-spm/command/macro/prebuild.rb
Constant Summary
Constants inherited from Pod::Command::Spm
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Prebuild
constructor
A new instance of Prebuild.
- #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) ⇒ Prebuild
Returns a new instance of Prebuild.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cocoapods-spm/command/macro/prebuild.rb', line 17 def initialize(argv) super update_cli_config( all: argv.flag?("all"), macros: argv.option("macros", "").split(","), config: argv.option("config"), dont_prebuild_macros: false, dont_prebuild_macros_if_exist: false ) end |
Class Method Details
.options ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/cocoapods-spm/command/macro/prebuild.rb', line 9 def self. [ ["--all", "Prebuild all macros"], ["--macros=foo", "Macros to prebuild, separated by comma (,)"], ["--config=foo", "Config (debug/release) to prebuild macros"], ].concat(super) end |
Instance Method Details
#run ⇒ Object
28 29 30 31 32 |
# File 'lib/cocoapods-spm/command/macro/prebuild.rb', line 28 def run spm_config.macros.each do |name| SPM::MacroPrebuilder.new(name: name).run end end |