class FakeFS::FakeFile::Inode
Inode class
Attributes
content[RW]
links[RW]
Public Class Methods
new(file_owner)
click to toggle source
# File lib/fakefs/fake/file.rb, line 9 def initialize(file_owner) # 1.9.3 when possible set default external encoding @content = '' @content = ''.encode( Encoding.default_external) if ''.respond_to?(:encode) @links = [file_owner] end
Public Instance Methods
clone()
click to toggle source
Calls superclass method
# File lib/fakefs/fake/file.rb, line 29 def clone clone = super clone.content = content.dup clone end
link(file)
click to toggle source
# File lib/fakefs/fake/file.rb, line 20 def link(file) links << file unless links.include?(file) file.inode = self end
unlink(file)
click to toggle source
# File lib/fakefs/fake/file.rb, line 25 def unlink(file) links.delete(file) end