Class: Pod::SPM::MacroFetcher
- Inherits:
-
Object
- Object
- Pod::SPM::MacroFetcher
- Includes:
- MacroConfigMixin
- Defined in:
- lib/cocoapods-spm/macro/fetcher.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MacroFetcher
constructor
A new instance of MacroFetcher.
- #run ⇒ Object
Methods included from MacroConfigMixin
#macro_dir, #macro_downloaded_dir, #macro_prebuilt_dir, #metadata, #metadata_path
Methods included from Config::SPMConfigMixin
#local_macro_pod?, #local_macro_pod_dir, #macro_pods, #spm_config
Methods included from Config::PodConfigMixin
Methods included from Config::ProjectConfigMixin
Constructor Details
#initialize(options = {}) ⇒ MacroFetcher
Returns a new instance of MacroFetcher.
12 13 14 15 16 17 |
# File 'lib/cocoapods-spm/macro/fetcher.rb', line 12 def initialize( = {}) @name = [:name] @specs_by_platform = [:specs_by_platform] @can_cache = [:can_cache] @podfile = Pod::Config.instance.podfile end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/cocoapods-spm/macro/fetcher.rb', line 10 def name @name end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cocoapods-spm/macro/fetcher.rb', line 19 def run prepare_macro_source macro_dir = spm_config.macro_root_dir / name macro_downloaded_dir = spm_config.macro_downloaded_root_dir / name FileUtils.copy_entry( macro_downloaded_dir / "Sources" / name, macro_dir / "Sources" / name ) end |