Class: AmsLazyRelationships::Core::LazyRelationshipMeta
- Inherits:
-
Object
- Object
- AmsLazyRelationships::Core::LazyRelationshipMeta
- Defined in:
- lib/ams_lazy_relationships/core/lazy_relationship_meta.rb
Overview
Internal helper class for keeping relationship details
Instance Attribute Summary collapse
-
#load_for ⇒ Object
readonly
Returns the value of attribute load_for.
-
#loader ⇒ Object
readonly
Returns the value of attribute loader.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#reflection ⇒ Object
readonly
Returns the value of attribute reflection.
Instance Method Summary collapse
-
#initialize(name:, loader:, reflection:, load_for: nil) ⇒ LazyRelationshipMeta
constructor
A new instance of LazyRelationshipMeta.
Constructor Details
#initialize(name:, loader:, reflection:, load_for: nil) ⇒ LazyRelationshipMeta
Returns a new instance of LazyRelationshipMeta.
14 15 16 17 18 19 |
# File 'lib/ams_lazy_relationships/core/lazy_relationship_meta.rb', line 14 def initialize(name:, loader:, reflection:, load_for: nil) @name = name.to_sym @loader = loader @reflection = reflection @load_for = load_for end |
Instance Attribute Details
#load_for ⇒ Object (readonly)
Returns the value of attribute load_for.
21 22 23 |
# File 'lib/ams_lazy_relationships/core/lazy_relationship_meta.rb', line 21 def load_for @load_for end |
#loader ⇒ Object (readonly)
Returns the value of attribute loader.
21 22 23 |
# File 'lib/ams_lazy_relationships/core/lazy_relationship_meta.rb', line 21 def loader @loader end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21 22 23 |
# File 'lib/ams_lazy_relationships/core/lazy_relationship_meta.rb', line 21 def name @name end |
#reflection ⇒ Object (readonly)
Returns the value of attribute reflection.
21 22 23 |
# File 'lib/ams_lazy_relationships/core/lazy_relationship_meta.rb', line 21 def reflection @reflection end |