Class ZOOM::ResultSet
Prev |  |

## 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_record` | each_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_option` | get_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.
`length` | length
| Synonym for `ZOOM::ResultSet#size`. Returns: the number of hits.
`records` | records
| Lists the records inside the result set. Returns: an array of `ZOOM::Record` objects.
`set_option` | set_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.
`size` | size
| Returns: the number of hits.

Prev | Up |
Class ZOOM::Record | Home |