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.



10
11
12
13
14
15
16
17
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 10

def initialize(installer_context, user_options)
  @environment_configs = user_options.fetch('environment_configs', default_configurations(installer_context))
  @disable_bitcode = user_options.fetch('disable_bitcode', true)
  @force_bitcode = user_options.fetch('force_bitcode', false)
  @minimum_ios_version = Gem::Version.new(user_options.fetch('minimum_ios_version', '11.0'))
  @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

#disable_bitcodeObject (readonly)

Returns the value of attribute disable_bitcode.



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

def disable_bitcode
  @disable_bitcode
end

#do_not_embed_dependencies_in_targetsObject (readonly)

Returns the value of attribute do_not_embed_dependencies_in_targets.



8
9
10
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 8

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.



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

def force_bitcode
  @force_bitcode
end

#minimum_ios_versionObject (readonly)

Returns the value of attribute minimum_ios_version.



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

def minimum_ios_version
  @minimum_ios_version
end

#xcodegen_dependencies_fileObject (readonly)

Returns the value of attribute xcodegen_dependencies_file.



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

def xcodegen_dependencies_file
  @xcodegen_dependencies_file
end

Instance Method Details

#allow_embed_dependencies_for(target) ⇒ Object



23
24
25
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 23

def allow_embed_dependencies_for(target)
  !do_not_embed_dependencies_in_targets.include?(normalize_target(target))
end

#environment_configs_for(target) ⇒ Object



19
20
21
# File 'lib/cocoapods-alexandria/helper/user_options.rb', line 19

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