Class: Ahnnotate::VfsDriver::ReadOnlyFilesystem

Inherits:
Filesystem
  • Object
show all
Defined in:
lib/ahnnotate/vfs_driver/read_only_filesystem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Filesystem

#[], #dir?, #each, #each_in

Constructor Details

#initialize(root:) ⇒ ReadOnlyFilesystem

Returns a new instance of ReadOnlyFilesystem.



6
7
8
9
# File 'lib/ahnnotate/vfs_driver/read_only_filesystem.rb', line 6

def initialize(root:)
  super
  @changes = {}
end

Instance Attribute Details

#changesObject (readonly)

Returns the value of attribute changes.



4
5
6
# File 'lib/ahnnotate/vfs_driver/read_only_filesystem.rb', line 4

def changes
  @changes
end

Instance Method Details

#[]=(path, content) ⇒ Object



11
12
13
14
# File 'lib/ahnnotate/vfs_driver/read_only_filesystem.rb', line 11

def []=(path, content)
  @changes[path] = content
  nil
end