Sha256: 6f70767ba964347cf5e8aa1a5e6ef30b8b7c3377cf074e7712d0f61481f45483

Contents?: true

Size: 1.42 KB

Versions: 28

Compression:

Stored size: 1.42 KB

Contents

module Xcake
  class Configuration
    # 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.
    #
    class PreprocessorDefinitionsSettingProxy
      # the settings for the configuration this
      # proxy is for
      #
      # @return [Hash<String, Object>] the settings for the
      #                                proxied configuration
      #
      attr_accessor :settings

      # @return [String] the key for the settings where the
      #                  preprocessor definitions are kept
      #
      attr_accessor :key

      # @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
      #
      def initialize(settings, key)
        @settings = settings
        @key = key
        @settings[@key] ||= ["$(inherited)"]
      end

      # 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
      #
      def []=(key, value)
        @settings[@key] << "#{key}=#{value}"
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
xcake-0.6.19 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.18 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.17 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.16 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.14 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.13 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.12 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.11 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.10 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.9 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.8 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.7 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.6 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.5 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.4 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.6.2 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.5.3 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.5.2 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.5.1 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.5.0 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb