Sha256: 7a6401b3ecb60e26231d2c94f4eb6f6d15862ebf621a4e1ea27de1d26df02f2d

Contents?: true

Size: 1.16 KB

Versions: 9

Compression:

Stored size: 1.16 KB

Contents

module Xcake
  # This class handles resolving the structure
  # of a project. Making sure that the structure of the
  # project is one Xcode can open and makes sense.
  #
  # As part of this it will create default configurations
  # if none are provided and will make sure both the project
  # and targets have all of the same configurations.
  class ProjectStructureGenerator < Generator

    attr_accessor :project

    def visit_project(project)

      puts "Resolving Project..."

      @project = project

      @project.debug_configuration :Debug if @project.debug_configurations.count == 0
      @project.release_configuration :Release if @project.release_configurations.count == 0
    end

    def leave_project(project)
    end

    def visit_target(target)

      puts "Resolving target #{target.name}..."

      @project.debug_configurations.each do |b|
        target.debug_configuration(b.name)
      end

      @project.release_configurations.each do |b|
        target.release_configuration(b.name)
      end
    end

    def leave_target(target)
    end

    def visit_configuration(configuration)
    end

    def leave_configuration(configuration)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
xcake-0.6.11 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.10 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.9 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.8 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.7 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.6 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.5 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.4 lib/xcake/generator/project_structure_generator.rb
xcake-0.6.2 lib/xcake/generator/project_structure_generator.rb