Class ZOOM::ResultSet

Abstract

The result set object is a container for records returned from a target.

Inherits from: Object ← ZOOM::ResultSet .

Included in: ZOOM .

Index: [] each_record get_option length records set_option size

Instance methods
[][](key)
 

Retrieves one or many records from the result set, according to the given key.

# Gets the first record.
rset[0]
# Gets the first, second and third records.
rset[1..3]
# Gets three records starting from the second one.
rset[2, 3]
 
  • key: either an integer, a range or an interval of 2 integers.

  • Returns: one or many references to ZOOM::Record objects.

each_recordeach_record { |record| ... }
 

Parses the records inside the result set and call the given block for each record, passing a reference to a ZOOM::Record object as parameter.

  • Returns: self.

get_optionget_option(key)
 

Gets the value of a result set's option.

  • key: the name of the option, as a string.

  • Returns: the value of the given option, as a string, integer or boolean.

lengthlength
 

Synonym for ZOOM::ResultSet#size.

  • Returns: the number of hits.

recordsrecords
 

Lists the records inside the result set.

set_optionset_option(key, value)
 

Sets an option on the result set.

  • value: the value of this option (as a string, integer or boolean).

  • key: the name of the option, as a string.

  • Returns: self.

sizesize
 
  • Returns: the number of hits.