Class: PBXProjParser

Inherits:
Object
  • Object
show all
Defined in:
lib/ccios/pbxproj_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_path, config) ⇒ PBXProjParser

Returns a new instance of PBXProjParser.



8
9
10
11
12
# File 'lib/ccios/pbxproj_parser.rb', line 8

def initialize(source_path, config)
  @source_path = source_path
  @config = config
  @projects = {}
end

Instance Attribute Details

#source_pathObject

Returns the value of attribute source_path.



6
7
8
# File 'lib/ccios/pbxproj_parser.rb', line 6

def source_path
  @source_path
end

Instance Method Details

#app_projectObject



14
15
16
# File 'lib/ccios/pbxproj_parser.rb', line 14

def app_project
  project_for(@config.app.project)
end

#app_targetObject



51
52
53
# File 'lib/ccios/pbxproj_parser.rb', line 51

def app_target
  target_for(app_project, @config.app.target)
end

#coordinator_groupObject



31
32
33
34
# File 'lib/ccios/pbxproj_parser.rb', line 31

def coordinator_group
  path = @config.app.coordinator.group
  app_project[path]
end

#core_projectObject



18
19
20
# File 'lib/ccios/pbxproj_parser.rb', line 18

def core_project
  project_for(@config.core.project)
end

#core_targetObject



55
56
57
# File 'lib/ccios/pbxproj_parser.rb', line 55

def core_target
  target_for(core_project, @config.core.target)
end

#data_projectObject



22
23
24
# File 'lib/ccios/pbxproj_parser.rb', line 22

def data_project
  project_for(@config.data.project)
end

#data_targetObject



59
60
61
# File 'lib/ccios/pbxproj_parser.rb', line 59

def data_target
  target_for(data_project, @config.data.target)
end

#interactor_groupObject



36
37
38
39
# File 'lib/ccios/pbxproj_parser.rb', line 36

def interactor_group
  path = @config.core.interactor.group
  core_project[path]
end

#presenter_groupObject



26
27
28
29
# File 'lib/ccios/pbxproj_parser.rb', line 26

def presenter_group
  path = @config.app.presenter.group
  app_project[path]
end

#repository_core_groupObject



41
42
43
44
# File 'lib/ccios/pbxproj_parser.rb', line 41

def repository_core_group
  path = @config.core.repository.group
  core_project[path]
end

#repository_data_groupObject



46
47
48
49
# File 'lib/ccios/pbxproj_parser.rb', line 46

def repository_data_group
  path = @config.data.repository.group
  data_project[path]
end

#saveObject



63
64
65
66
67
# File 'lib/ccios/pbxproj_parser.rb', line 63

def save
  app_project.save
  core_project.save
  data_project.save
end