Class: Pathname

Inherits:
Object show all
Defined in:
lib/angry_mob/extend/pathname.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.here(file) ⇒ Object



4
5
6
# File 'lib/angry_mob/extend/pathname.rb', line 4

def self.here(file)
  Pathname(file).dirname.expand_path
end

Instance Method Details

#cp_to(to) ⇒ Object



16
17
18
# File 'lib/angry_mob/extend/pathname.rb', line 16

def cp_to(to)
  FileUtils.cp(self,to)
end

#lsObject



20
21
22
# File 'lib/angry_mob/extend/pathname.rb', line 20

def ls
  Pathname.glob(self+'*').reject {|e| e.basename.to_s[0] == '.'}
end

#pathnameObject



8
9
10
# File 'lib/angry_mob/extend/pathname.rb', line 8

def pathname
  Pathname(self)
end

#touchObject



12
13
14
# File 'lib/angry_mob/extend/pathname.rb', line 12

def touch
  FileUtils.touch(self)
end