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
15 16 17 |
# File 'app/models/metasploit/model/association/reflection.rb', line 15 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.
22 23 24 |
# File 'app/models/metasploit/model/association/reflection.rb', line 22 def model @model end |
#name ⇒ String
The name of this association.
28 29 30 |
# File 'app/models/metasploit/model/association/reflection.rb', line 28 def name @name end |
Instance Method Details
#klass ⇒ Object
Class with name #class_name.
46 47 48 |
# File 'app/models/metasploit/model/association/reflection.rb', line 46 def klass class_name.constantize end |