class FakeFS::FakeSymlink

Fake symlink class

Attributes

name[RW]
parent[RW]
target[RW]

Public Class Methods

new(target) click to toggle source
# File lib/fakefs/fake/symlink.rb, line 6
def initialize(target)
  @target = target
end

Public Instance Methods

delete() click to toggle source
# File lib/fakefs/fake/symlink.rb, line 18
def delete
  parent.delete(self)
end
entry() click to toggle source
# File lib/fakefs/fake/symlink.rb, line 14
def entry
  FileSystem.find(File.expand_path(target.to_s, parent.to_s))
end
inspect() click to toggle source
# File lib/fakefs/fake/symlink.rb, line 10
def inspect
  "symlink(#{name} -> #{target.split('/').last})"
end
respond_to?(method, include_private = false) click to toggle source
# File lib/fakefs/fake/symlink.rb, line 26
def respond_to?(method, include_private = false)
  entry.respond_to?(method, include_private)
end
to_s() click to toggle source
# File lib/fakefs/fake/symlink.rb, line 22
def to_s
  File.join(parent.to_s, name)
end

Private Instance Methods

method_missing(*args, &block) click to toggle source
# File lib/fakefs/fake/symlink.rb, line 32
def method_missing(*args, &block)
  entry.send(*args, &block)
end