class Metasploit::Model::Association::Error

Error raised by {Metasploit::Model::Association::ClassMethods#reflect_on_association!}.

Attributes

model[R]

@!attribute [r] model

ActiveModel on which the association with {#name} was not found.

@return [Class]
name[R]

@!attribute [r] name

Name of association that was not registered on {#model}.

@return [Symbol]

Public Class Methods

new(attributes={}) click to toggle source

@param attributes [Hash{Symbol => Object}] @option attributes [Class] :model ActiveModel that is missing association with :name. @option attributes [Symbol] :name name of the association that is missing. @raise [KeyError] if :model is not given @raise [KeyError] if :name is not given

Calls superclass method
# File lib/metasploit/model/association/error.rb, line 29
def initialize(attributes={})
  @model = attributes.fetch(:model)
  @name = attributes.fetch(:name)

  super("#{model} does not have #{name} association.")
end