Class: HMap::BuildSettingsWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/hmap/xc/target/build_setting.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(platforms, context) ⇒ BuildSettingsWriter

Initialize a new instance

Parameters:



92
93
94
95
# File 'lib/hmap/xc/target/build_setting.rb', line 92

def initialize(platforms, context)
  @platforms = platforms
  @context = context
end

Instance Attribute Details

#platformsObject (readonly)

Returns the value of attribute platforms.



82
83
84
# File 'lib/hmap/xc/target/build_setting.rb', line 82

def platforms
  @platforms
end

Instance Method Details



97
98
99
100
101
102
103
104
105
# File 'lib/hmap/xc/target/build_setting.rb', line 97

def write_or_symlink(path, data, platforms = [])
  build_settings.each do |setting|
    type_data = data[setting.type] unless data.nil?
    next if type_data.nil? && path.nil?

    need_platform = platforms.include?(setting.type)
    setting.write_or_symlink(path, type_data, need_platform)
  end
end