Exception: Chef::ChefFS::FileSystem::OperationNotAllowedError
- Inherits:
-
FileSystemError
- Object
- StandardError
- FileSystemError
- Chef::ChefFS::FileSystem::OperationNotAllowedError
- Defined in:
- lib/chef/chef_fs/file_system/operation_not_allowed_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
Attributes inherited from FileSystemError
Instance Method Summary collapse
-
#initialize(operation, entry, cause = nil) ⇒ OperationNotAllowedError
constructor
A new instance of OperationNotAllowedError.
- #reason ⇒ Object
Constructor Details
#initialize(operation, entry, cause = nil) ⇒ OperationNotAllowedError
Returns a new instance of OperationNotAllowedError.
25 26 27 28 |
# File 'lib/chef/chef_fs/file_system/operation_not_allowed_error.rb', line 25 def initialize(operation, entry, cause = nil) super(entry, cause) @operation = operation end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
31 32 33 |
# File 'lib/chef/chef_fs/file_system/operation_not_allowed_error.rb', line 31 def entry @entry end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
30 31 32 |
# File 'lib/chef/chef_fs/file_system/operation_not_allowed_error.rb', line 30 def operation @operation end |
Instance Method Details
#reason ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/chef/chef_fs/file_system/operation_not_allowed_error.rb', line 33 def 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 end |