Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/vfs/integration.rb

Direct Known Subclasses

Vfs::Path

Instance Method Summary (collapse)

Instance Method Details

- (Object) to_dir_on(driver = nil) Also known as: to_dir



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

def to_dir_on driver = nil
  to_entry_on(driver).dir
end

- (Object) to_entry_on(driver = nil) Also known as: to_entry



2
3
4
5
6
7
8
# File 'lib/vfs/integration.rb', line 2

def to_entry_on driver = nil
  path = self
  driver ||= Vfs.default_driver

  path = "./#{path}" unless path =~ /^[\/\.\~]/
  Vfs::Entry.new(driver, path).entry
end

- (Object) to_file_on(driver = nil) Also known as: to_file



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

def to_file_on driver = nil
  to_entry_on(driver).file
end