Class: Garb::ResultSet

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/garb/result_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(results) ⇒ ResultSet

Returns a new instance of ResultSet.



9
10
11
# File 'lib/garb/result_set.rb', line 9

def initialize(results)
  @results = results
end

Instance Attribute Details

#sampledObject Also known as: sampled?

Returns the value of attribute sampled.



5
6
7
# File 'lib/garb/result_set.rb', line 5

def sampled
  @sampled
end

#total_resultsObject

Returns the value of attribute total_results.



5
6
7
# File 'lib/garb/result_set.rb', line 5

def total_results
  @total_results
end

Instance Method Details

#each(&block) ⇒ Object



13
14
15
# File 'lib/garb/result_set.rb', line 13

def each(&block)
  @results.each(&block)
end

#to_aObject



17
18
19
# File 'lib/garb/result_set.rb', line 17

def to_a
  @results
end