Sha256: 41baa2b3582963d9c492bc1a0f4b21c5fc6c39a996788907c74da27e0702cf73

Contents?: true

Size: 1.43 KB

Versions: 18

Compression:

Stored size: 1.43 KB

Contents

module Xcake
  # This class represents a Build Configuration
  # in a xcode project.
  #
  # This forms part of the DSL and is usally
  # stored in files named `Cakefile`.
  #
  class Configuration
    include Visitable

    # @return [String] the name of the configuration
    #
    attr_accessor :name

    # @return [Symbol] the type of the configuration, either :debug or :release
    #
    attr_accessor :type

    # the settings for the configuration
    # this is what is used for the build settings
    # for the build configuration.
    #
    # @return [Hash<String, String>] the settings for the configuration
    #
    attr_accessor :settings

    # @return [String] the path of the xcconfig file to use for
    #         the build configuration.
    #
    #         This is resolved to a PBXFileReference.
    #
    attr_accessor :configuration_file

    # @param    [String] name
    #           the name of the configuration.
    #           This is used for the build configuration name.
    #
    # @param    [Proc] block
    #           an optional block that configures the
    #           configuration through the DSL.
    #
    # @example  Creating a Configuration.
    #
    #           Configuration.new :debug do |c|
    #             c.settings["INFO_PLIST"] = "./myapp/info.plist"
    #           end
    #
    def initialize(name)
      self.name = name.to_s
      self.settings = {}

      yield(self) if block_given?
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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