Class: Pod::SPM::MacroMetadata

Inherits:
Pod::Swift::PackageDescription show all
Defined in:
lib/cocoapods-spm/macro/metadata.rb

Instance Attribute Summary

Attributes inherited from Pod::Swift::PackageDescriptionBaseObject

#parent, #raw

Class Method Summary collapse

Methods inherited from Pod::Swift::PackageDescription

#artifacts_dir, #checkouts_dir, #dependencies, from_dir, #macro_impl_name, #products, #slug, #src_dir, #targets, #targets_of_product, #use_default_xcode_linking?

Methods included from Config::SPMConfigMixin

#local_macro_pod?, #local_macro_pod_dir, #macro_pods, #spm_config

Methods included from Config::PodConfigMixin

#pod_config

Methods included from Config::ProjectConfigMixin

#project_config

Methods inherited from Pod::Swift::PackageDescriptionBaseObject

#[], #dup_with_attrs, from_file, from_s, #initialize, #inspect, #name, #pkg_name, #root

Constructor Details

This class inherits a constructor from Pod::Swift::PackageDescriptionBaseObject

Class Method Details

.for_pod(name) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/cocoapods-spm/macro/metadata.rb', line 6

def self.for_pod(name)
  path = Config.instance.macro_root_dir / name / "metadata.json"
  unless path.exist?
    UI.message "Will fetch macro #{name} because its metadata does not exist at #{path}"
    require "cocoapods-spm/macro/fetcher"
    MacroFetcher.new(name: name, can_cache: true).run
  end
  from_file(path)
end