Class: Chef::ChefFS::FileSystem::ChefServer::CookbookArtifactDir
- Inherits:
-
CookbookDir
- Object
- BaseFSObject
- BaseFSDir
- CookbookDir
- Chef::ChefFS::FileSystem::ChefServer::CookbookArtifactDir
- Defined in:
- lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb
Instance Attribute Summary
Attributes inherited from CookbookDir
Attributes inherited from BaseFSObject
Instance Method Summary collapse
- #copy_from(other, options = {}) ⇒ Object
-
#initialize(name, parent, options = {}) ⇒ CookbookArtifactDir
constructor
A new instance of CookbookArtifactDir.
Methods inherited from CookbookDir
#add_child, #api_path, #can_have_child?, #chef_object, #chef_rest, #children, #compare_to, #delete, #dir?, #exists?, #make_child_entry, #rest
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?, #path_for_printing, #read, #root, #write
Constructor Details
#initialize(name, parent, options = {}) ⇒ CookbookArtifactDir
Returns a new instance of CookbookArtifactDir.
26 27 28 29 |
# File 'lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb', line 26 def initialize(name, parent, = {}) super(name, parent) @cookbook_name, dash, @version = name.rpartition("-") end |
Instance Method Details
#copy_from(other, options = {}) ⇒ Object
31 32 33 |
# File 'lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb', line 31 def copy_from(other, = {}) raise OperationNotAllowedError.new(:write, self, nil, "cannot be updated: cookbook artifacts are immutable once uploaded") end |