Class: HMap::BuildSettings

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, platform, context) ⇒ BuildSettings

Returns a new instance of BuildSettings.



32
33
34
35
36
# File 'lib/hmap/xc/target/build_setting.rb', line 32

def initialize(type, platform, context)
  @type = type
  @platform = platform.to_s || ''
  @context = context
end

Instance Attribute Details

#platformObject (readonly)

Returns the value of attribute platform.



26
27
28
# File 'lib/hmap/xc/target/build_setting.rb', line 26

def platform
  @platform
end

#typeObject (readonly)

Returns the value of attribute type.



26
27
28
# File 'lib/hmap/xc/target/build_setting.rb', line 26

def type
  @type
end

Class Method Details

.new_from_platforms(type, platforms, context) ⇒ Object



28
29
30
# File 'lib/hmap/xc/target/build_setting.rb', line 28

def self.new_from_platforms(type, platforms, context)
  platforms.map { |platform| new(type, platform.to_s, context) }
end

Instance Method Details



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/hmap/xc/target/build_setting.rb', line 38

def write_or_symlink(path, data, need_platform)
  return if data.nil? && path.nil?

  if data.nil?
    dir = platform if type == :all_product_headers
    path = Constants.instance.full_hmap_filepath(type, path, dir)
    symlink_to(path, need_platform)
  else
    write(data, need_platform)
  end
end