Exception: Acfs::ResourceNotLoaded

Inherits:
Error
  • Object
show all
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

Instance Method Summary collapse

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

#resourceObject (readonly)

Returns the value of attribute resource.



123
124
125
# File 'lib/acfs/errors.rb', line 123

def resource
  @resource
end