Class: HMap::BuildSettings
- Inherits:
-
Object
- Object
- HMap::BuildSettings
- Defined in:
- lib/hmap/xc/target/build_setting.rb
Instance Attribute Summary collapse
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type, platform, context) ⇒ BuildSettings
constructor
A new instance of BuildSettings.
- #write_or_symlink(path, data, need_platform) ⇒ Object
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
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
26 27 28 |
# File 'lib/hmap/xc/target/build_setting.rb', line 26 def platform @platform end |
#type ⇒ Object (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
#write_or_symlink(path, data, need_platform) ⇒ Object
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 |