Sha256: ee405bff3467342c17a83b55c948ef423e483856a74a77b92cbcf91de1162bdf

Contents?: true

Size: 1.42 KB

Versions: 27

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

27 entries across 27 versions & 1 rubygems

Version Path
xcake-0.13.0 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.12.1 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.12.0 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.11.0 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.10.0 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.9.4 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.9.3 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.9.2 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.9.1 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.9.0 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.13 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.12 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.10 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.9 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.8 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.7 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.6 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.3 lib/xcake/dsl/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.8.1 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb
xcake-0.7.1 lib/xcake/configuration/proxies/preproccessor_definitions_setting_proxy.rb