Module: Pod::SPM::Config::SPMConfigMixin

Included in:
Mixin
Defined in:
lib/cocoapods-spm/config/spm.rb

Instance Method Summary collapse

Instance Method Details

#local_macro_pod?(name) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/cocoapods-spm/config/spm.rb', line 17

def local_macro_pod?(name)
  !local_macro_pod_dir(name).nil?
end

#local_macro_pod_dir(name) ⇒ Object



21
22
23
24
25
26
# File 'lib/cocoapods-spm/config/spm.rb', line 21

def local_macro_pod_dir(name)
  opts = macro_pods.fetch(name, {})
  return Path(opts[:podspec]).dirname if opts.key?(:podspec)

  Pathname(opts[:path]) if opts.key?(:path)
end

#macro_podsObject



13
14
15
# File 'lib/cocoapods-spm/config/spm.rb', line 13

def macro_pods
  pod_config.podfile.macro_pods
end

#spm_configObject



9
10
11
# File 'lib/cocoapods-spm/config/spm.rb', line 9

def spm_config
  Config.instance
end