Sha256: ab3a2900b50df574d896baa4791511a487171a0d9d16dc75f956b7d05785a4ca
Contents?: true
Size: 1.05 KB
Versions: 38
Compression:
Stored size: 1.05 KB
Contents
module CloudSesame module Query module DSL module Operators # NEAR: creates a single NEAR node # ======================================= def near(value, options = {}) _build_operator AST::Near, options, value end alias_method :sloppy, :near # PREFIX: creates a single PREFIX node # ======================================= def prefix(value, options = {}) _build_operator AST::Prefix, options, value end alias_method :start_with, :prefix alias_method :begin_with, :prefix # PHRASE: creates a single PHRASE node # ======================================= def phrase(value, options = {}) _build_operator AST::Phrase, options, value end # TERM: creates a single TERM node # ======================================= def term(value, options = {}) _build_operator AST::Term, options, value end private def _build_operator(klass, options, value) node = klass.new _context, options node << AST::Literal.new(nil, value) node end end end end end
Version data entries
38 entries across 38 versions & 1 rubygems