Class: Metasploit::Model::Association::Reflection
- Defined in:
- app/models/metasploit/model/association/reflection.rb
Overview
Reflection of the call to ClassMethods#association.
Instance Attribute Summary collapse
-
#class_name ⇒ String
The name #klass.
-
#model ⇒ Class
The model on which this association was declared.
-
#name ⇒ String
The name of this association.
Instance Method Summary collapse
-
#klass ⇒ Object
Class with name #class_name.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Metasploit::Model::Base
Instance Attribute Details
#class_name ⇒ String
12 13 14 |
# File 'app/models/metasploit/model/association/reflection.rb', line 12 def class_name @class_name end |
#model ⇒ Class
The model on which this association was declared. The equivalent for ActiveRecord association reflections would be #active_record.
19 20 21 |
# File 'app/models/metasploit/model/association/reflection.rb', line 19 def model @model end |
#name ⇒ String
The name of this association.
25 26 27 |
# File 'app/models/metasploit/model/association/reflection.rb', line 25 def name @name end |
Instance Method Details
#klass ⇒ Object
Class with name #class_name.
43 44 45 |
# File 'app/models/metasploit/model/association/reflection.rb', line 43 def klass class_name.constantize end |