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.
103 104 105 106 107 108 109 110 |
# File 'lib/weft/query.rb', line 103 def initialize(app, word, = {}) super(app) if word.empty? raise ArgumentError.new('No word supplied for CONTAINS WORD function') end @word = word = end |
Instance Attribute Details
#word ⇒ Object (readonly)
Returns the value of attribute word.
102 103 104 |
# File 'lib/weft/query.rb', line 102 def word @word end |
Instance Method Details
#calculate ⇒ Object
116 117 118 |
# File 'lib/weft/query.rb', line 116 def calculate() @app.get_search_fragments(@word, ) end |
#to_s ⇒ Object
112 113 114 |
# File 'lib/weft/query.rb', line 112 def to_s() "( SEARCH(#{@word.inspect}) )" end |