diff options
author | danielsdeleo <dan@chef.io> | 2016-02-06 14:53:22 -0800 |
---|---|---|
committer | danielsdeleo <dan@chef.io> | 2016-02-16 15:26:43 -0800 |
commit | c02218871b0cd87b6e2b12f9ab1d1135bd4bbc89 (patch) | |
tree | 2a1c4970eccfb72aefd66bc877cf8f81ae671b4b | |
parent | bde347f1b8310e2ae9d2f8884385c980a989f413 (diff) | |
download | chef-c02218871b0cd87b6e2b12f9ab1d1135bd4bbc89.tar.gz |
inline superclasses for cheffs cookbook entry by 3
-rw-r--r-- | lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb index 770a7bbd58..6254e30b29 100644 --- a/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +++ b/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb @@ -36,7 +36,10 @@ class Chef #class ChefRepositoryFileSystemCookbookEntry < FileSystemEntry # With FileSystemEntry inlined - class ChefRepositoryFileSystemCookbookEntry < BaseFSDir + #class ChefRepositoryFileSystemCookbookEntry < BaseFSDir + + # With BaseFSDir inlined + class ChefRepositoryFileSystemCookbookEntry < BaseFSObject # Original initialize ## def initialize(name, parent, file_path = nil, ruby_only = false, recursive = false) ## super(name, parent, file_path) @@ -261,6 +264,30 @@ class Chef ## FileSystemEntry.new(child_name, self) ## end + ############################## + # inlined from BaseFSDir + ############################## + + # trivial initializer + ## def initialize(name, parent) + ## super + ## end + + # overriden by subclass + ## def dir? + ## true + ## end + + # overriden by subclass + ## def can_have_child?(name, is_dir) + ## true + ## end + + # An empty children array is an empty dir + def empty? + children.empty? + end + end end end |