PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/Rake/string.rb

http://github.com/agross/netopenspace
Ruby | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | 1e47a74a7996afece5cb1df91bc47ebf MD5 | raw file
 1class String
 2	def escape
 3		"\"#{self.to_s}\""
 4	end
 5	
 6	def in(dir)
 7		File.join(dir, self)
 8	end
 9	
10	def name()
11		File.basename(self)
12	end	
13	
14	def dirname()
15		File.dirname(self)
16	end
17
18	def to_absolute()
19		File.expand_path(self)
20	end
21end