Exception: Acfs::ResourceTypeError

Inherits:
Error
  • Object
show all
Defined in:
lib/acfs/errors.rb

Overview

Gets raised if ressource type is no valid subclass of parent resource. Check if the type is set to the correct Acfs::Resource Name

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ ResourceTypeError

Returns a new instance of ResourceTypeError.



137
138
139
140
141
142
143
# File 'lib/acfs/errors.rb', line 137

def initialize(opts = {})
  @base_class    = opts.delete :base_class
  @type_name     = opts.delete :type_name
  opts[:message] = "Received resource type `#{type_name}` " \
                   "is no subclass of #{base_class}"
  super
end

Instance Attribute Details

#base_classObject (readonly)

Returns the value of attribute base_class.



135
136
137
# File 'lib/acfs/errors.rb', line 135

def base_class
  @base_class
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



135
136
137
# File 'lib/acfs/errors.rb', line 135

def type_name
  @type_name
end