class Chef::ChefFS::FileSystem::EnvironmentsDir::DefaultEnvironmentEntry
Public Class Methods
new(name, parent, exists = nil)
click to toggle source
Calls superclass method
# File lib/chef/chef_fs/file_system/environments_dir.rb, line 42 def initialize(name, parent, exists = nil) super(name, parent) @exists = exists end
Public Instance Methods
delete(recurse)
click to toggle source
# File lib/chef/chef_fs/file_system/environments_dir.rb, line 47 def delete(recurse) raise NotFoundError.new(self) if !exists? raise DefaultEnvironmentCannotBeModifiedError.new(:delete, self), "#{path_for_printing} cannot be deleted." end
write(file_contents)
click to toggle source
# File lib/chef/chef_fs/file_system/environments_dir.rb, line 52 def write(file_contents) raise NotFoundError.new(self) if !exists? raise DefaultEnvironmentCannotBeModifiedError.new(:write, self), "#{path_for_printing} cannot be updated." end