Sha256: 1259317c18274d78b5e83f4613a22c0f28f455c2d6c7c789e08c7e6e38e93026
Contents?: true
Size: 697 Bytes
Versions: 41
Compression:
Stored size: 697 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_missing?(method, include_private = false) entry.respond_to?(method, include_private) end private def method_missing(*args, &block) # rubocop:disable Style/MethodMissingSuper entry.send(*args, &block) end end end
Version data entries
41 entries across 41 versions & 1 rubygems