Class: FakeFS::Dir
- Inherits:
-
Object
- Object
- FakeFS::Dir
- Defined in:
- lib/fakefs/dir.rb
Class Method Summary collapse
- .[](pattern) ⇒ Object
- .chdir(dir, &blk) ⇒ Object
- .glob(pattern) ⇒ Object
- .pwd ⇒ Object (also: getwd)
Class Method Details
.[](pattern) ⇒ Object
7 8 9 |
# File 'lib/fakefs/dir.rb', line 7 def self.[](pattern) glob(pattern) end |
.chdir(dir, &blk) ⇒ Object
11 12 13 |
# File 'lib/fakefs/dir.rb', line 11 def self.chdir(dir, &blk) FileSystem.chdir(dir, &blk) end |
.glob(pattern) ⇒ Object
3 4 5 |
# File 'lib/fakefs/dir.rb', line 3 def self.glob(pattern) [FileSystem.find(pattern) || []].flatten.map{|e| e.to_s}.sort end |
.pwd ⇒ Object Also known as: getwd
15 16 17 |
# File 'lib/fakefs/dir.rb', line 15 def self.pwd FileSystem.current_dir.to_s end |