Class: ActiveRecordDataLoader::Dsl::BelongsToAssociation
- Inherits:
-
Object
- Object
- ActiveRecordDataLoader::Dsl::BelongsToAssociation
- Defined in:
- lib/active_record_data_loader/dsl/belongs_to_association.rb
Instance Attribute Summary collapse
-
#model_class ⇒ Object
readonly
Returns the value of attribute model_class.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(model_class, name, query = nil) ⇒ BelongsToAssociation
constructor
A new instance of BelongsToAssociation.
Constructor Details
#initialize(model_class, name, query = nil) ⇒ BelongsToAssociation
Returns a new instance of BelongsToAssociation.
8 9 10 11 12 |
# File 'lib/active_record_data_loader/dsl/belongs_to_association.rb', line 8 def initialize(model_class, name, query = nil) @model_class = model_class @name = name @query = query end |
Instance Attribute Details
#model_class ⇒ Object (readonly)
Returns the value of attribute model_class.
6 7 8 |
# File 'lib/active_record_data_loader/dsl/belongs_to_association.rb', line 6 def model_class @model_class end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/active_record_data_loader/dsl/belongs_to_association.rb', line 6 def name @name end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
6 7 8 |
# File 'lib/active_record_data_loader/dsl/belongs_to_association.rb', line 6 def query @query end |