Class: ThinkingSphinx::Join

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/join.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#associationsObject

Returns the value of attribute associations.



3
4
5
# File 'lib/thinking_sphinx/join.rb', line 3

def associations
  @associations
end

#columnObject

Returns the value of attribute column.



3
4
5
# File 'lib/thinking_sphinx/join.rb', line 3

def column
  @column
end

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/thinking_sphinx/join.rb', line 3

def source
  @source
end