Class: PodAlexandria::UserOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-alexandria/helper/user_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(installer_context, user_options) ⇒ UserOptions

Returns a new instance of UserOptions.



8
9
10
11
12
13
# 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

Instance Attribute Details

#do_not_embed_dependencies_in_targetsObject (readonly)

Returns the value of attribute do_not_embed_dependencies_in_targets.



6
7
8
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 6

def do_not_embed_dependencies_in_targets
  @do_not_embed_dependencies_in_targets
end

#environment_configsObject (readonly)

Returns the value of attribute environment_configs.



3
4
5
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 3

def environment_configs
  @environment_configs
end

#force_bitcodeObject (readonly)

Returns the value of attribute force_bitcode.



4
5
6
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 4

def force_bitcode
  @force_bitcode
end

#xcodegen_dependencies_fileObject (readonly)

Returns the value of attribute xcodegen_dependencies_file.



5
6
7
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 5

def xcodegen_dependencies_file
  @xcodegen_dependencies_file
end

Instance Method Details

#allow_embed_dependencies_for(target) ⇒ Object



19
20
21
# 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) ⇒ Object



15
16
17
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 15

def environment_configs_for(target)
  environment_configs[normalize_target(target)]
end