Sha256: f4147735c9d2d4173d1e0f3ac3fd9346a187472f828c554223b52dd5d9df27d9
Contents?: true
Size: 646 Bytes
Versions: 6
Compression:
Stored size: 646 Bytes
Contents
module FakeFS # Fake symlink class class FakeSymlink attr_accessor :name, :target, :parent def initialize(target) @target = target end def inspect "symlink(#{name} -> #{target.split('/').last})" end def entry FileSystem.find(File.expand_path(target.to_s, parent.to_s)) end def delete parent.delete(self) end def to_s File.join(parent.to_s, name) end def respond_to?(method, include_private = false) entry.respond_to?(method, include_private) end private def method_missing(*args, &block) entry.send(*args, &block) end end end
Version data entries
6 entries across 6 versions & 1 rubygems