Exception: Acfs::ResourceNotLoaded
- Defined in:
- lib/acfs/errors.rb
Overview
A ResourceNotLoaded error will be thrown when calling some modifing methods on not loaded resources as it is usally unwanted to call e.g. ‘update_attributes` on a not loaded resource. Correct solution is to first run `Acfs.run` to fetch the resource and then update the resource.
Instance Attribute Summary collapse
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ResourceNotLoaded
constructor
A new instance of ResourceNotLoaded.
Constructor Details
#initialize(opts = {}) ⇒ ResourceNotLoaded
Returns a new instance of ResourceNotLoaded.
125 126 127 128 |
# File 'lib/acfs/errors.rb', line 125 def initialize(opts = {}) @resource = opts.delete :resource super end |
Instance Attribute Details
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
123 124 125 |
# File 'lib/acfs/errors.rb', line 123 def resource @resource end |