class ChefFS::FileSystem::EnvironmentsDir::DefaultEnvironmentEntry

Public Class Methods

new(name, parent, exists = nil) click to toggle source
Calls superclass method
# File lib/chef_fs/file_system/environments_dir.rb, line 41
def initialize(name, parent, exists = nil)
  super(name, parent)
  @exists = exists
end

Public Instance Methods

delete(recurse) click to toggle source
# File lib/chef_fs/file_system/environments_dir.rb, line 46
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_fs/file_system/environments_dir.rb, line 51
def write(file_contents)
  raise NotFoundError.new(self) if !exists?
  raise DefaultEnvironmentCannotBeModifiedError.new(:write, self), "#{path_for_printing} cannot be updated."
end