class Xcake::Configuration::PreprocessorDefinitionsSettingProxy
This class is a proxy to the Preprocessor build setting. It abstracts the setting of the value for this setting and makes it easier to define new preprocessor definitions.
Attributes
key[RW]
@return [String] the key for the settings where the
preprocessor definitions are kept
settings[RW]
the settings for the configuration this proxy is for
@return [Hash<String, Object>] the settings for the
proxied configuration
Public Class Methods
new(settings, key)
click to toggle source
@param [Hash<String, Object>] settings
the settings for the proxied configuration
@param [String] key
the key for the settings where the preprocessor definitions are kept
# File lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb, line 29 def initialize(settings, key) @settings = settings @key = key @settings[@key] ||= ['$(inherited)'] end
Public Instance Methods
[]=(key, value)
click to toggle source
The subscript operator is used to define the preprocessor defination
@param [String] key
the key for the preprocessor definition
@param [Object] value
the value for the preprocessor definition
# File lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb, line 43 def []=(key, value) @settings[@key] << "#{key}=#{value}" end