Class: EstraierPure::NodeResult
- Inherits:
-
Object
- Object
- EstraierPure::NodeResult
- Defined in:
- lib/vendor/estraierpure.rb
Overview
++ Abstraction of result set from node.
Instance Method Summary collapse
-
#doc_num ⇒ Object
Get the number of documents.
-
#get_doc(index) ⇒ Object
Get the value of hint information.
-
#hint(key) ⇒ Object
Get the value of hint information.
Instance Method Details
#doc_num ⇒ Object
Get the number of documents. The return value is the number of documents.
397 398 399 |
# File 'lib/vendor/estraierpure.rb', line 397 def doc_num() @docs.length end |
#get_doc(index) ⇒ Object
Get the value of hint information. The return value is a result document object or ‘nil’ if the index is out of bounds.
402 403 404 405 406 |
# File 'lib/vendor/estraierpure.rb', line 402 def get_doc(index) Utility::check_types({ index=>Integer }) if $DEBUG return nil if index < 0 || index >= @docs.length @docs[index] end |
#hint(key) ⇒ Object
Get the value of hint information. ‘key’ specifies the key of a hint. “VERSION”, “NODE”, “HIT”, “HINT#n”, “DOCNUM”, “WORDNUM”, “TIME”, “LINK#n”, and “VIEW” are provided for keys. The return value is the hint or ‘nil’ if the key does not exist.
411 412 413 414 |
# File 'lib/vendor/estraierpure.rb', line 411 def hint(key) Utility::check_types({ key=>String }) if $DEBUG @hints[key] end |