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.



29
30
31
# File 'lib/xcodeproject/data.rb', line 29

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

Instance Method Details

#add_dir(parent_gpath, path) ⇒ Object



57
58
59
# File 'lib/xcodeproject/data.rb', line 57

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

#add_file(parent_gpath, path) ⇒ Object



69
70
71
# File 'lib/xcodeproject/data.rb', line 69

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

#add_group(gpath) ⇒ Object



53
54
55
# File 'lib/xcodeproject/data.rb', line 53

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

#doctorObject



77
78
79
# File 'lib/xcodeproject/data.rb', line 77

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

#file(gpath) ⇒ Object



65
66
67
# File 'lib/xcodeproject/data.rb', line 65

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

#group(gpath) ⇒ Object



49
50
51
# File 'lib/xcodeproject/data.rb', line 49

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

#main_groupObject



45
46
47
# File 'lib/xcodeproject/data.rb', line 45

def main_group
	project.main_group
end

#projectObject



33
34
35
# File 'lib/xcodeproject/data.rb', line 33

def project
	@root.project
end

#remove_file(gpath) ⇒ Object



73
74
75
# File 'lib/xcodeproject/data.rb', line 73

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

#remove_group(gpath) ⇒ Object



61
62
63
# File 'lib/xcodeproject/data.rb', line 61

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

#target(name) ⇒ Object



41
42
43
# File 'lib/xcodeproject/data.rb', line 41

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

#targetsObject



37
38
39
# File 'lib/xcodeproject/data.rb', line 37

def targets
	project.targets
end

#to_plist(fmtr = Formatter.new) ⇒ Object



81
82
83
# File 'lib/xcodeproject/data.rb', line 81

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