Class: BabySqueel::JoinDependency::Finder
- Inherits:
-
Object
- Object
- BabySqueel::JoinDependency::Finder
- Defined in:
- lib/baby_squeel/join_dependency/finder.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#join_dependency ⇒ Object
readonly
Returns the value of attribute join_dependency.
Instance Method Summary collapse
- #find_alias(reflection) ⇒ Object
-
#initialize(join_dependency) ⇒ Finder
constructor
A new instance of Finder.
Constructor Details
#initialize(join_dependency) ⇒ Finder
Returns a new instance of Finder.
6 7 8 |
# File 'lib/baby_squeel/join_dependency/finder.rb', line 6 def initialize(join_dependency) @join_dependency = join_dependency end |
Instance Attribute Details
#join_dependency ⇒ Object (readonly)
Returns the value of attribute join_dependency.
4 5 6 |
# File 'lib/baby_squeel/join_dependency/finder.rb', line 4 def join_dependency @join_dependency end |
Instance Method Details
#find_alias(reflection) ⇒ Object
10 11 12 13 |
# File 'lib/baby_squeel/join_dependency/finder.rb', line 10 def find_alias(reflection) join_association = find_association(reflection) join_association.tables.first if join_association end |