class Chef::ChefFS::FileSystem::OperationNotAllowedError

Attributes

entry[R]
operation[R]

Public Class Methods

new(operation, entry, cause = nil, reason = nil) click to toggle source
# File lib/chef/chef_fs/file_system/exceptions.rb, line 65
def initialize(operation, entry, cause = nil, reason = nil)
  reason ||=
    case operation
    when :delete
      "cannot be deleted"
    when :write
      "cannot be updated"
    when :create_child
      "cannot have a child created under it"
    when :read
      "cannot be read"
    end
  super(entry, cause, reason)
  @operation = operation
end