Class: Chef::ChefFS::FileSystem::Memory::MemoryRoot

Inherits:
MemoryDir show all
Defined in:
lib/chef/chef_fs/file_system/memory/memory_root.rb

Instance Attribute Summary collapse

Attributes inherited from MemoryDir

#children

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from MemoryDir

#add_child, #add_dir, #add_file, #can_have_child?, #make_child_entry

Methods inherited from BaseFSDir

#can_have_child?, #dir?, #empty?

Methods inherited from BaseFSObject

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

Constructor Details

#initialize(pretty_name, cannot_be_in_regex = nil) ⇒ MemoryRoot

Returns a new instance of MemoryRoot.



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

def initialize(pretty_name, cannot_be_in_regex = nil)
  super("", nil)
  @pretty_name = pretty_name
  @cannot_be_in_regex = cannot_be_in_regex
end

Instance Attribute Details

#cannot_be_in_regexObject (readonly)

Returns the value of attribute cannot_be_in_regex.



14
15
16
# File 'lib/chef/chef_fs/file_system/memory/memory_root.rb', line 14

def cannot_be_in_regex
  @cannot_be_in_regex
end

Instance Method Details

#path_for_printingObject



16
17
18
# File 'lib/chef/chef_fs/file_system/memory/memory_root.rb', line 16

def path_for_printing
  @pretty_name
end