Class: QDA::Query::WordSearchFunction
- Defined in:
- lib/weft/query.rb
Instance Attribute Summary collapse
-
#word ⇒ Object
readonly
Returns the value of attribute word.
Instance Method Summary collapse
- #calculate ⇒ Object
-
#initialize(app, word, options = {}) ⇒ WordSearchFunction
constructor
A new instance of WordSearchFunction.
- #to_s ⇒ Object
Methods inherited from Function
Constructor Details
#initialize(app, word, options = {}) ⇒ WordSearchFunction
Returns a new instance of WordSearchFunction.
111 112 113 114 115 116 117 118 |
# File 'lib/weft/query.rb', line 111 def initialize(app, word, = {}) super(app) if word.empty? raise ArgumentError.new('No word supplied for CONTAINS WORD function') end @word = word @options = end |
Instance Attribute Details
#word ⇒ Object (readonly)
Returns the value of attribute word.
110 111 112 |
# File 'lib/weft/query.rb', line 110 def word @word end |
Instance Method Details
#calculate ⇒ Object
124 125 126 |
# File 'lib/weft/query.rb', line 124 def calculate() @app.get_search_fragments(@word, @options) end |
#to_s ⇒ Object
120 121 122 |
# File 'lib/weft/query.rb', line 120 def to_s() "( SEARCH(#{@word.inspect}) )" end |