/tools/Rake/string.rb

http://github.com/agross/netopenspace · Ruby · 21 lines · 17 code · 4 blank · 0 comment · 0 complexity · 1e47a74a7996afece5cb1df91bc47ebf MD5 · raw file

  1. class String
  2. def escape
  3. "\"#{self.to_s}\""
  4. end
  5. def in(dir)
  6. File.join(dir, self)
  7. end
  8. def name()
  9. File.basename(self)
  10. end
  11. def dirname()
  12. File.dirname(self)
  13. end
  14. def to_absolute()
  15. File.expand_path(self)
  16. end
  17. end