Class: HMap::Target
- Inherits:
-
Object
- Object
- HMap::Target
- Includes:
- Helper
- Defined in:
- lib/hmap/xc/target/target.rb,
lib/hmap/xc/target/target_helper.rb,
lib/hmap/xc/target/target_context.rb
Defined Under Namespace
Modules: Helper Classes: TargetContext
Instance Attribute Summary collapse
-
#entrys ⇒ Object
readonly
Returns the value of attribute entrys.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#xcconfig_paths ⇒ Object
Returns the value of attribute xcconfig_paths.
Instance Method Summary collapse
-
#initialize(entrys, target, project) ⇒ Target
constructor
A new instance of Target.
- #platforms ⇒ Object
- #remove_hmap_settings! ⇒ Object
- #save_hmap_settings! ⇒ Object
- #write_hmapfile! ⇒ Object
Methods included from Helper
#app_target?, #build_as_framework?, #build_as_framework_swift?, #build_dir, #build_root, #context, #defines_module?, #full_product_name, #hmap_root, #product_name, #target_name, #temp_dir, #temp_name, #uses_swift?
Methods included from HeaderType
#headers_hash, #private_entrys, #project_entrys, #public_entrys, #use_vfs?
Constructor Details
#initialize(entrys, target, project) ⇒ Target
Returns a new instance of Target.
14 15 16 17 18 19 |
# File 'lib/hmap/xc/target/target.rb', line 14 def initialize(entrys, target, project) @entrys = entrys || [] @target = target @project = project @xcconfig_paths = [] end |
Instance Attribute Details
#entrys ⇒ Object (readonly)
Returns the value of attribute entrys.
11 12 13 |
# File 'lib/hmap/xc/target/target.rb', line 11 def entrys @entrys end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
11 12 13 |
# File 'lib/hmap/xc/target/target.rb', line 11 def project @project end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
11 12 13 |
# File 'lib/hmap/xc/target/target.rb', line 11 def target @target end |
#xcconfig_paths ⇒ Object
Returns the value of attribute xcconfig_paths.
12 13 14 |
# File 'lib/hmap/xc/target/target.rb', line 12 def xcconfig_paths @xcconfig_paths end |
Instance Method Details
#platforms ⇒ Object
21 22 23 |
# File 'lib/hmap/xc/target/target.rb', line 21 def platforms project.platforms end |
#remove_hmap_settings! ⇒ Object
38 39 40 |
# File 'lib/hmap/xc/target/target.rb', line 38 def remove_hmap_settings! build_setting_paths.each { |path| HMap::XcodeprojHelper.new(path).remove_build_settings_and_save } end |
#save_hmap_settings! ⇒ Object
31 32 33 34 35 36 |
# File 'lib/hmap/xc/target/target.rb', line 31 def save_hmap_settings! build_setting_paths.each do |path| settings = Constants.instance.hmap_build_settings XcodeprojHelper.new(path).add_build_settings_and_save(settings, use_origin: Resolver.instance.use_origin) end end |
#write_hmapfile! ⇒ Object
25 26 27 28 29 |
# File 'lib/hmap/xc/target/target.rb', line 25 def write_hmapfile! datas = headers_hash(:own_target_headers) build_settings = BuildSettingsWriter.new(platforms, context) build_settings.write_or_symlink(project.context.hmap_root, datas, Constants::HMAP_FILE_TYPE) end |