class Garb::ResultSet

Attributes

results[RW]
sampled[RW]
sampled?[RW]
total_results[RW]

Public Class Methods

new(results) click to toggle source
# File lib/garb/result_set.rb, line 14
def initialize(results)
  @results = results
end

Public Instance Methods

+(other) click to toggle source
# File lib/garb/result_set.rb, line 22
def +(other)
  copy = self.dup
  copy.results = @results + other.to_a
  copy
end
<=>(other) click to toggle source
# File lib/garb/result_set.rb, line 18
def <=>(other)
  results <=> other.results
end
[](*args) click to toggle source
# File lib/garb/result_set.rb, line 28
def [](*args)
  return @results[*args] if args.size == 1 && args.first.is_a?(Integer)
  copy = self.dup
  copy.results = @results[*args]
  copy
end