Exception: Metasploit::Model::Association::Error
- Defined in:
- lib/metasploit/model/association/error.rb
Overview
Error raised by ClassMethods#reflect_on_association!.
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(attributes = {}) ⇒ Error
Returns a new instance of Error.
31 32 33 34 35 36 |
# File 'lib/metasploit/model/association/error.rb', line 31 def initialize(attributes={}) @model = attributes.fetch(:model) @name = attributes.fetch(:name) super("#{model} does not have #{name} association.") end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
14 15 16 |
# File 'lib/metasploit/model/association/error.rb', line 14 def model @model end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/metasploit/model/association/error.rb', line 20 def name @name end |