Class: ThinkingSphinx::Join
- Inherits:
-
Object
- Object
- ThinkingSphinx::Join
- Defined in:
- lib/thinking_sphinx/join.rb
Instance Attribute Summary collapse
-
#associations ⇒ Object
Returns the value of attribute associations.
-
#column ⇒ Object
Returns the value of attribute column.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source, column) ⇒ Join
constructor
A new instance of Join.
Constructor Details
#initialize(source, column) ⇒ Join
Returns a new instance of Join.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/thinking_sphinx/join.rb', line 5 def initialize(source, column) @source = source @column = column @associations = association_stack(column.__path.clone).each { |assoc| assoc.join_to(source.base) } source.joins << self end |
Instance Attribute Details
#associations ⇒ Object
Returns the value of attribute associations.
3 4 5 |
# File 'lib/thinking_sphinx/join.rb', line 3 def associations @associations end |
#column ⇒ Object
Returns the value of attribute column.
3 4 5 |
# File 'lib/thinking_sphinx/join.rb', line 3 def column @column end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/thinking_sphinx/join.rb', line 3 def source @source end |