Class: Xcake::Configuration::PreprocessorDefinitionsSettingProxy
- Inherits:
-
Object
- Object
- Xcake::Configuration::PreprocessorDefinitionsSettingProxy
- Defined in:
- lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
Overview
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.
Instance Attribute Summary collapse
-
#key ⇒ String
The key for the settings where the preprocessor definitions are kept.
-
#settings ⇒ Hash<String, Object>
the settings for the configuration this proxy is for.
Instance Method Summary collapse
-
#[]=(key, value) ⇒ Object
The subscript operator is used to define the preprocessor defination.
-
#initialize(settings, key) ⇒ PreprocessorDefinitionsSettingProxy
constructor
A new instance of PreprocessorDefinitionsSettingProxy.
Constructor Details
#initialize(settings, key) ⇒ PreprocessorDefinitionsSettingProxy
Returns a new instance of PreprocessorDefinitionsSettingProxy.
29 30 31 32 33 |
# 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 |
Instance Attribute Details
#key ⇒ String
Returns the key for the settings where the preprocessor definitions are kept.
20 21 22 |
# File 'lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb', line 20 def key @key end |
#settings ⇒ Hash<String, Object>
the settings for the configuration this proxy is for
15 16 17 |
# File 'lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb', line 15 def settings @settings end |
Instance Method Details
#[]=(key, value) ⇒ Object
The subscript operator is used to define the preprocessor defination
43 44 45 |
# File 'lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb', line 43 def []=(key, value) @settings[@key] << "#{key}=#{value}" end |