Class: Pod::SPM::Config
- Inherits:
-
Object
- Object
- Pod::SPM::Config
- Defined in:
- lib/cocoapods-spm/config.rb
Defined Under Namespace
Modules: Mixin
Instance Attribute Summary collapse
-
#cli_config ⇒ Object
Returns the value of attribute cli_config.
-
#dsl_config ⇒ Object
Returns the value of attribute dsl_config.
Class Method Summary collapse
Instance Method Summary collapse
- #all_macros ⇒ Object
- #dont_prebuild_macros? ⇒ Boolean
- #dont_prebuild_macros_if_exist? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #macro_config ⇒ Object
- #macro_downloaded_root_dir ⇒ Object
- #macro_downloaded_sandbox ⇒ Object
- #macro_root_dir ⇒ Object
- #macros ⇒ Object
- #merged_config ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
16 17 18 19 20 21 22 |
# File 'lib/cocoapods-spm/config.rb', line 16 def initialize @dsl_config = { :dont_prebuild_macros => false, :dont_prebuild_macros_if_exist => true } @cli_config = {} end |
Instance Attribute Details
#cli_config ⇒ Object
Returns the value of attribute cli_config.
14 15 16 |
# File 'lib/cocoapods-spm/config.rb', line 14 def cli_config @cli_config end |
#dsl_config ⇒ Object
Returns the value of attribute dsl_config.
14 15 16 |
# File 'lib/cocoapods-spm/config.rb', line 14 def dsl_config @dsl_config end |
Class Method Details
Instance Method Details
#all_macros ⇒ Object
44 45 46 |
# File 'lib/cocoapods-spm/config.rb', line 44 def all_macros @all_macros ||= Pod::Config.instance.podfile.macro_pods.keys end |
#dont_prebuild_macros? ⇒ Boolean
32 33 34 |
# File 'lib/cocoapods-spm/config.rb', line 32 def dont_prebuild_macros? merged_config[:dont_prebuild_macros] end |
#dont_prebuild_macros_if_exist? ⇒ Boolean
36 37 38 |
# File 'lib/cocoapods-spm/config.rb', line 36 def dont_prebuild_macros_if_exist? merged_config[:dont_prebuild_macros_if_exist] end |
#macro_config ⇒ Object
40 41 42 |
# File 'lib/cocoapods-spm/config.rb', line 40 def macro_config merged_config[:config] || merged_config[:default_macro_config] || "debug" end |
#macro_downloaded_root_dir ⇒ Object
56 57 58 |
# File 'lib/cocoapods-spm/config.rb', line 56 def macro_downloaded_root_dir macro_root_dir / ".downloaded" end |
#macro_downloaded_sandbox ⇒ Object
60 61 62 |
# File 'lib/cocoapods-spm/config.rb', line 60 def macro_downloaded_sandbox @macro_downloaded_sandbox ||= Sandbox.new(macro_downloaded_root_dir) end |
#macro_root_dir ⇒ Object
52 53 54 |
# File 'lib/cocoapods-spm/config.rb', line 52 def macro_root_dir @macro_root_dir ||= Pathname(".spm.pods") end |
#macros ⇒ Object
48 49 50 |
# File 'lib/cocoapods-spm/config.rb', line 48 def macros merged_config[:all] ? all_macros : (merged_config[:macros] || []) end |
#merged_config ⇒ Object
28 29 30 |
# File 'lib/cocoapods-spm/config.rb', line 28 def merged_config @dsl_config.merge(@cli_config) end |