Class: Xcake::ProjectStructureGenerator

Inherits:
Generator show all
Defined in:
lib/xcake/generator/project_structure_generator.rb

Overview

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.

Instance Attribute Summary collapse

Attributes inherited from Generator

#context

Instance Method Summary collapse

Methods inherited from Generator

#initialize, plugins_location

Methods included from Visitor

#item_name, #leave, #visit

Methods included from Plugin

included

Methods included from Dependency

included

Constructor Details

This class inherits a constructor from Xcake::Generator

Instance Attribute Details

#projectObject

Returns the value of attribute project.



10
11
12
# File 'lib/xcake/generator/project_structure_generator.rb', line 10

def project
  @project
end

Instance Method Details

#leave_configuration(configuration) ⇒ Object



35
36
# File 'lib/xcake/generator/project_structure_generator.rb', line 35

def leave_configuration(configuration)
end

#leave_project(project) ⇒ Object



18
19
# File 'lib/xcake/generator/project_structure_generator.rb', line 18

def leave_project(project)
end

#leave_target(target) ⇒ Object



29
30
# File 'lib/xcake/generator/project_structure_generator.rb', line 29

def leave_target(target)
end

#visit_configuration(configuration) ⇒ Object



32
33
# File 'lib/xcake/generator/project_structure_generator.rb', line 32

def visit_configuration(configuration)
end

#visit_project(project) ⇒ Object



12
13
14
15
16
# File 'lib/xcake/generator/project_structure_generator.rb', line 12

def visit_project(project)
  puts 'Resolving Project...'

  @project = project
end

#visit_target(target) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/xcake/generator/project_structure_generator.rb', line 21

def visit_target(target)
  puts "Resolving target #{target}..."

  @project.all_configurations.each do |c|
    target.configuration(c.name, c.type)
  end
end