Class: Baza::Driver::Tiny::Result
Instance Method Summary
collapse
Methods inherited from ResultBase
#to_a, #to_a_enum, #to_enum
Constructor Details
#initialize(result) ⇒ Result
Returns a new instance of Result.
2
3
4
5
|
# File 'lib/baza/driver/tiny/result.rb', line 2
def initialize(result)
@result = result.to_a
result.cancel
end
|
Instance Method Details
#each(&blk) ⇒ Object
7
8
9
|
# File 'lib/baza/driver/tiny/result.rb', line 7
def each(&blk)
enum.each(&blk)
end
|
#fetch ⇒ Object
11
12
13
14
15
|
# File 'lib/baza/driver/tiny/result.rb', line 11
def fetch
enum.next
rescue StopIteration
nil
end
|