Class: XcodeProject::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/xcodeproject/data.rb

Instance Method Summary collapse

Constructor Details

#initialize(data, wd) ⇒ Data

Returns a new instance of Data.



27
28
29
# File 'lib/xcodeproject/data.rb', line 27

def initialize (data, wd)
	@root = RootNode.new(data, wd)
end

Instance Method Details

#add_dir(parent_gpath, path) ⇒ Object



55
56
57
# File 'lib/xcodeproject/data.rb', line 55

def add_dir(parent_gpath, path)
	main_group.add_group(parent_gpath).add_dir(path)
end

#add_file(parent_gpath, path) ⇒ Object



67
68
69
# File 'lib/xcodeproject/data.rb', line 67

def add_file (parent_gpath, path)
	main_group.add_group(parent_gpath).add_file(path)
end

#add_group(gpath) ⇒ Object



51
52
53
# File 'lib/xcodeproject/data.rb', line 51

def add_group (gpath)
	main_group.add_group(gpath)
end

#doctorObject



75
76
77
# File 'lib/xcodeproject/data.rb', line 75

def doctor
	targets.each {|target| target.doctor }
end

#file(gpath) ⇒ Object



63
64
65
# File 'lib/xcodeproject/data.rb', line 63

def file (gpath)
	main_group.file(gpath)
end

#group(gpath) ⇒ Object



47
48
49
# File 'lib/xcodeproject/data.rb', line 47

def group (gpath)
	main_group.group(gpath)
end

#main_groupObject



43
44
45
# File 'lib/xcodeproject/data.rb', line 43

def main_group
	project.main_group
end

#projectObject



31
32
33
# File 'lib/xcodeproject/data.rb', line 31

def project
	@root.project
end

#remove_file(gpath) ⇒ Object



71
72
73
# File 'lib/xcodeproject/data.rb', line 71

def remove_file (gpath)
	main_group.remove_file(gpath)
end

#remove_group(gpath) ⇒ Object



59
60
61
# File 'lib/xcodeproject/data.rb', line 59

def remove_group (gpath)
	main_group.remove_group(gpath)
end

#target(name) ⇒ Object



39
40
41
# File 'lib/xcodeproject/data.rb', line 39

def target (name)
	project.target(name)
end

#targetsObject



35
36
37
# File 'lib/xcodeproject/data.rb', line 35

def targets
	project.targets
end

#to_plist(fmtr = Formatter.new) ⇒ Object



79
80
81
# File 'lib/xcodeproject/data.rb', line 79

def to_plist (fmtr = Formatter.new)
	@root.to_plist
end