Class: ChefFS::FileSystem::ChefRepositoryFileSystemDataBagsDir

Inherits:
ChefRepositoryFileSystemEntry show all
Defined in:
lib/chef_fs/file_system/chef_repository_file_system_data_bags_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

Methods inherited from FileSystemEntry

#children, #create_child, #delete, #dir?, #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) ⇒ ChefRepositoryFileSystemDataBagsDir

Returns a new instance of ChefRepositoryFileSystemDataBagsDir.



25
26
27
# File 'lib/chef_fs/file_system/chef_repository_file_system_data_bags_dir.rb', line 25

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

Instance Method Details

#can_have_child?(name, is_dir) ⇒ Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/chef_fs/file_system/chef_repository_file_system_data_bags_dir.rb', line 29

def can_have_child?(name, is_dir)
  is_dir && !name.start_with?('.')
end