Sha256: 3ba7a58251dcb3827dae51821f714ba25571fe639315283dbdfff1d995147fb0

Contents?: true

Size: 501 Bytes

Versions: 9

Compression:

Stored size: 501 Bytes

Contents

module FakeFS
  class FakeSymlink
    attr_accessor :name, :target
    alias_method  :to_s, :name

    def initialize(target)
      @target = target
    end

    def inspect
      "symlink(#{target.split('/').last})"
    end

    def entry
      FileSystem.find(target)
    end

    def delete
      parent.delete(self)
    end

    def respond_to?(method)
      entry.respond_to?(method)
    end

  private
    
    def method_missing(*args, &block)
      entry.send(*args, &block)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
vim-jar-0.0.3 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
vim-jar-0.0.2 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
vim-jar-0.0.1 bundler/ruby/1.8/gems/fakefs-0.2.1/lib/fakefs/fake/symlink.rb
fakefs-0.2.1 lib/fakefs/fake/symlink.rb
fakefs-0.2.0 lib/fakefs/fake/symlink.rb