Sha256: aec03971cb318e970f74394b73c4e7cb241e35bbdd908c21b34a11dd30dd5804

Contents?: true

Size: 369 Bytes

Versions: 3

Compression:

Stored size: 369 Bytes

Contents

class ThinkingSphinx::ActiveRecord::Column
  def initialize(*stack)
    @stack = stack
    @name  = stack.pop
  end

  def __name
    @name
  end

  def __stack
    @stack
  end

  def string?
    __name.is_a?(String)
  end

  def to_ary
    [self]
  end

  private

  def method_missing(method, *args, &block)
    @stack << @name
    @name = method
    self
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinking-sphinx-3.0.0 lib/thinking_sphinx/active_record/column.rb
thinking-sphinx-3.0.0.rc lib/thinking_sphinx/active_record/column.rb
thinking-sphinx-3.0.0.pre lib/thinking_sphinx/active_record/column.rb