class ThinkingSphinx::ActiveRecord::Column
Public Class Methods
new(*stack)
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 4 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 9 def __name @name end
__path()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 13 def __path @stack + [@name] end
__replace(stack, replacements)
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 17 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 25 def __stack @stack end
string?()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 29 def string? __name.is_a?(String) end
to_ary()
click to toggle source
# File lib/thinking_sphinx/active_record/column.rb, line 33 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 39 def method_missing(method, *args, &block) @stack << @name @name = method self end