Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/launchr/extend/pathname.rb
Instance Method Summary collapse
- #chown_R(user, group) ⇒ Object
- #group ⇒ Object
- #include?(partial) ⇒ Boolean
- #touch ⇒ Object
- #user ⇒ Object
Instance Method Details
#chown_R(user, group) ⇒ Object
9 10 11 12 |
# File 'lib/launchr/extend/pathname.rb', line 9 def chown_R user, group require 'fileutils' FileUtils.chown_R user, group, self.to_s end |
#group ⇒ Object
18 19 20 |
# File 'lib/launchr/extend/pathname.rb', line 18 def group Etc.getgrgid(self.stat.gid).name end |
#include?(partial) ⇒ Boolean
5 6 7 |
# File 'lib/launchr/extend/pathname.rb', line 5 def include? partial self.to_s.include? partial.to_s end |
#touch ⇒ Object
22 23 24 25 |
# File 'lib/launchr/extend/pathname.rb', line 22 def touch require 'fileutils' FileUtils.touch self.to_s end |
#user ⇒ Object
14 15 16 |
# File 'lib/launchr/extend/pathname.rb', line 14 def user Etc.getpwuid(self.stat.uid).name end |