Sha256: 84fc196f0335f05b0ad89c36c7288315a68108892d8fdb0e890a87447711b061

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

require 'xcodeproj'

module Xcake
  module Generator
    # This generator processes the configuraions
    # and creates xcode build configurations.
    #
    class Configuration

      include Visitor

      # @return [Project] project for the configuration
      #
      attr_accessor :project

      # @return [Object] object from xcode project the configuration is for
      #
      attr_accessor :configuration_target

      # @param    [Project] project for the configuration
      #
      # @param    [Object] object from xcode project the configuration is for
      #
      def initialize(project, configuration_target)
        @project = project
        @configuration_target = configuration_target
      end

      protected

      def visit_configuration(configuration)
        puts "Creating build configuration #{configuration.name} for #{@configuration_target}..."

        build_configuration = @project.new(Xcodeproj::Project::Object::XCBuildConfiguration)

        build_configuration.name = configuration.name
        build_configuration.build_settings = configuration.settings

        @configuration_target.build_configurations << build_configuration
      end

      def leave_configuration(configuration)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
xcake-0.5.3 lib/xcake/generator/configuration.rb
xcake-0.5.2 lib/xcake/generator/configuration.rb
xcake-0.5.1 lib/xcake/generator/configuration.rb
xcake-0.5.0 lib/xcake/generator/configuration.rb
xcake-0.4.8 lib/xcake/generator/configuration.rb
xcake-0.4.7 lib/xcake/generator/configuration.rb
xcake-0.4.6 lib/xcake/generator/configuration.rb
xcake-0.4.5 lib/xcake/generator/configuration.rb
xcake-0.4.4 lib/xcake/generator/configuration.rb
xcake-0.4.3 lib/xcake/generator/configuration.rb
xcake-0.4.2 lib/xcake/generator/configuration.rb
xcake-0.4.1 lib/xcake/generator/configuration.rb