class PodAlexandria::UserOptions
Attributes
do_not_embed_dependencies_in_targets[R]
environment_configs[R]
force_bitcode[R]
xcodegen_dependencies_file[R]
Public Class Methods
new(installer_context, user_options)
click to toggle source
# File lib/cocoapods-alexandria/helper/user_options.rb, line 8 def initialize(installer_context, user_options) @environment_configs = user_options.fetch('environment_configs', default_configurations(installer_context)) @force_bitcode = user_options.fetch('force_bitcode', true) @xcodegen_dependencies_file = user_options.fetch('xcodegen_dependencies_file', 'projectDependencies.yml') @do_not_embed_dependencies_in_targets = user_options.fetch('do_not_embed_dependencies_in_targets', []) end
Public Instance Methods
allow_embed_dependencies_for(target)
click to toggle source
# File lib/cocoapods-alexandria/helper/user_options.rb, line 19 def allow_embed_dependencies_for(target) !do_not_embed_dependencies_in_targets.include?(normalize_target(target)) end
environment_configs_for(target)
click to toggle source
# File lib/cocoapods-alexandria/helper/user_options.rb, line 15 def environment_configs_for(target) environment_configs[normalize_target(target)] end
Private Instance Methods
default_configurations(installer_context)
click to toggle source
# File lib/cocoapods-alexandria/helper/user_options.rb, line 25 def default_configurations(installer_context) if installer_context.respond_to? :umbrella_targets installer_context.umbrella_targets.map { |target| target_name = normalize_target(target.cocoapods_target_label) configs = installer_context.pods_project.configurations .map { |config| [config, "Supporting Files/Settings-#{config.gsub('-', ' ').split[0]}.xcconfig"] } .to_h [target_name, configs] }.to_h else {} end end
normalize_target(target)
click to toggle source
# File lib/cocoapods-alexandria/helper/user_options.rb, line 39 def normalize_target(target) target.sub(/^Pods-/, '') end