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.
29 30 31 32 33 34 |
# 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 |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
12 13 14 |
# File 'lib/metasploit/model/association/error.rb', line 12 def model @model end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/metasploit/model/association/error.rb', line 18 def name @name end |