Module: Vfs

Defined in:
lib/vfs/entry_proxy.rb,
lib/vfs/vfs.rb,
lib/vfs/path.rb,
lib/vfs/error.rb,
lib/vfs/entries/dir.rb,
lib/vfs/entries/file.rb,
lib/vfs/drivers/local.rb,
lib/vfs/entries/entry.rb,
lib/vfs/entries/universal_entry.rb

Overview

It allows dynamically (magically) switching between UniversalEntry/Dir/File

Defined Under Namespace

Modules: Drivers Classes: Dir, Entry, EntryProxy, Error, File, Path, UniversalEntry

Class Method Summary collapse

Class Method Details

.default_driverObject



3
4
5
# File 'lib/vfs/vfs.rb', line 3

def default_driver
  ::Vfs::Drivers::Local.new
end

.to_dirObject



15
16
17
# File 'lib/vfs/vfs.rb', line 15

def to_dir
  to_entry.dir
end

.to_entryObject



7
8
9
# File 'lib/vfs/vfs.rb', line 7

def to_entry
  '/'.to_entry
end

.to_fileObject



11
12
13
# File 'lib/vfs/vfs.rb', line 11

def to_file
  to_entry.file
end