Class: Chef::ChefFS::FileSystem::ChefRepositoryFileSystemAclsDir

Inherits:
ChefRepositoryFileSystemEntry show all
Defined in:
lib/chef/chef_fs/file_system/chef_repository_file_system_acls_dir.rb

Instance Attribute Summary

Attributes inherited from FileSystemEntry

#file_path

Attributes inherited from BaseFSObject

#name, #parent, #path

Instance Method Summary collapse

Methods inherited from ChefRepositoryFileSystemEntry

#chef_object, #children, #data_handler, #minimize, #write, #write_pretty_json, #write_pretty_json=

Methods inherited from FileSystemEntry

#children, #create_child, #delete, #dir?, #exists?, #path_for_printing, #read, #write

Methods inherited from BaseFSDir

#child, #dir?

Methods inherited from BaseFSObject

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

Constructor Details

#initialize(name, parent, path = nil) ⇒ ChefRepositoryFileSystemAclsDir

Returns a new instance of ChefRepositoryFileSystemAclsDir.



27
28
29
# File 'lib/chef/chef_fs/file_system/chef_repository_file_system_acls_dir.rb', line 27

def initialize(name, parent, path = nil)
  super(name, parent, path, Chef::ChefFS::DataHandler::AclDataHandler.new)
end

Instance Method Details

#can_have_child?(name, is_dir) ⇒ Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/chef/chef_fs/file_system/chef_repository_file_system_acls_dir.rb', line 31

def can_have_child?(name, is_dir)
  is_dir ? Chef::ChefFS::FileSystem::AclsDir::ENTITY_TYPES.include?(name) : name == 'organization.json'
end