Class: Chef::ChefFS::FileSystem::Memory::MemoryFile

Inherits:
BaseFSObject
  • Object
show all
Defined in:
lib/chef/chef_fs/file_system/memory/memory_file.rb

Instance Attribute Summary

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from BaseFSObject

#can_have_child?, #chef_object, #child, #children, #compare_to, #create_child, #delete, #dir?, #exists?, #path_for_printing, #root, #write

Constructor Details

#initialize(name, parent, value) ⇒ MemoryFile


8
9
10
11
# File 'lib/chef/chef_fs/file_system/memory/memory_file.rb', line 8

def initialize(name, parent, value)
  super(name, parent)
  @value = value
end

Instance Method Details

#readObject


13
14
15
# File 'lib/chef/chef_fs/file_system/memory/memory_file.rb', line 13

def read
  @value
end