Sha256: 30833a962ba8abf7941bafb7b647f1f0d5f9e0a97402cef39d25ec732f25ef4c

Contents?: true

Size: 399 Bytes

Versions: 15

Compression:

Stored size: 399 Bytes

Contents

class String
  def to_entry_on storage = nil
    path = self
    storage ||= Vfs.default_storage
    
    Vfs::Dir.new(storage, '/')[path]
  end
  alias_method :to_entry, :to_entry_on  
  
  def to_file_on storage = nil
    to_entry_on(storage).file
  end
  alias_method :to_file, :to_file_on
  
  def to_dir_on storage = nil
    to_entry_on(storage).dir
  end
  alias_method :to_dir, :to_dir_on
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vfs-0.3.12 lib/vfs/integration/string.rb
vfs-0.3.11 lib/vfs/integration/string.rb
vfs-0.3.10 lib/vfs/integration/string.rb
vfs-0.3.9 lib/vfs/integration/string.rb
vfs-0.3.8 lib/vfs/integration/string.rb
vfs-0.3.7 lib/vfs/integration/string.rb
vfs-0.3.6 lib/vfs/integration/string.rb
vfs-0.3.5 lib/vfs/integration/string.rb
vfs-0.3.4 lib/vfs/integration/string.rb
vfs-0.3.3 lib/vfs/integration/string.rb
vfs-0.3.2 lib/vfs/integration/string.rb
vfs-0.3.1 lib/vfs/integration/string.rb
vfs-0.3 lib/vfs/integration/string.rb
vfs-0.2.1 lib/vfs/integration/string.rb
vfs-0.2 lib/vfs/integration/string.rb