module Mongoid::Fts

Public Class Methods

able() click to toggle source
# File lib/mongoid-fts/able.rb, line 64
def FTS.able
  Able
end
dependencies() click to toggle source
# File lib/mongoid-fts.rb, line 12
def dependencies
  {
    'mongoid'       => [ 'mongoid'       , '~> 3.1' ] ,
    'map'           => [ 'map'           , '~> 6.5' ] ,
    'coerce'        => [ 'coerce'        , '~> 0.0' ] ,
    'unicode_utils' => [ 'unicode_utils' , '~> 1.4' ] ,
    'stringex'      => [ 'stringex'      , '~> 2.0' ] ,
    'fast_stemmer'  => [ 'fast-stemmer'  , '~> 1.0' ] ,
  }
end
included(other) click to toggle source
Calls superclass method
# File lib/mongoid-fts.rb, line 190
def FTS.included(other)
  other.send(:include, Able)
  super
end
libdir(*args, &block) click to toggle source
# File lib/mongoid-fts.rb, line 23
def libdir(*args, &block)
  @libdir ||= File.expand_path(__FILE__).sub(/\.rb$/,'')
  args.empty? ? @libdir : File.join(@libdir, *args)
ensure
  if block
    begin
      $LOAD_PATH.unshift(@libdir)
      block.call()
    ensure
      $LOAD_PATH.shift()
    end
  end
end
load(*libs) click to toggle source
# File lib/mongoid-fts.rb, line 37
def load(*libs)
  libs = libs.join(' ').scan(/[^\s+]+/)
  libdir{ libs.each{|lib| Kernel.load(lib) } }
end
version() click to toggle source
# File lib/mongoid-fts.rb, line 8
def version
  const_get(:Version)
end