Class: Chef::ChefFS::FileSystem::BaseFSDir
- Inherits:
-
BaseFSObject
- Object
- BaseFSObject
- Chef::ChefFS::FileSystem::BaseFSDir
- Defined in:
- lib/chef/chef_fs/file_system/base_fs_dir.rb
Direct Known Subclasses
ChefServerRootDir, CookbookDir, CookbookSubdir, FileSystemEntry, RestListDir
Instance Attribute Summary
Attributes inherited from BaseFSObject
Instance Method Summary collapse
- #can_have_child?(name, is_dir) ⇒ Boolean
-
#child(name) ⇒ Object
Override child(name) to provide a child object by name without the network read.
- #dir? ⇒ Boolean
-
#initialize(name, parent) ⇒ BaseFSDir
constructor
A new instance of BaseFSDir.
Methods inherited from BaseFSObject
#compare_to, #exists?, #path_for_printing, #root
Constructor Details
#initialize(name, parent) ⇒ BaseFSDir
Returns a new instance of BaseFSDir.
26 27 28 |
# File 'lib/chef/chef_fs/file_system/base_fs_dir.rb', line 26 def initialize(name, parent) super end |
Instance Method Details
#can_have_child?(name, is_dir) ⇒ Boolean
39 40 41 |
# File 'lib/chef/chef_fs/file_system/base_fs_dir.rb', line 39 def can_have_child?(name, is_dir) true end |
#child(name) ⇒ Object
Override child(name) to provide a child object by name without the network read
35 36 37 |
# File 'lib/chef/chef_fs/file_system/base_fs_dir.rb', line 35 def child(name) children.select { |child| child.name == name }.first || NonexistentFSObject.new(name, self) end |
#dir? ⇒ Boolean
30 31 32 |
# File 'lib/chef/chef_fs/file_system/base_fs_dir.rb', line 30 def dir? true end |