class ThinkingSphinx::ActiveRecord::Column
Public Class Methods
new(*stack)
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 2 def initialize(*stack) @stack = stack @name = stack.pop end
Public Instance Methods
__name()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 7 def __name @name end
__path()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 11 def __path @stack + [@name] end
__replace(stack, replacements)
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 15 def __replace(stack, replacements) return [self] if string? || __stack[0..stack.length-1] != stack replacements.collect { |replacement| self.class.new *(replacement + __stack[stack.length..-1]), __name } end
__stack()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 23 def __stack @stack end
string?()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 27 def string? __name.is_a?(String) end
to_ary()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 31 def to_ary [self] end
Private Instance Methods
method_missing(method, *args, &block)
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 37 def method_missing(method, *args, &block) @stack << @name @name = method self end