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

- (Join) initialize(source, column)

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

- (Object) associations

Returns the value of attribute associations



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

def associations
  @associations
end

- (Object) column

Returns the value of attribute column



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

def column
  @column
end

- (Object) source

Returns the value of attribute source



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

def source
  @source
end