Class: Swift::Result
- Inherits:
-
Object
- Object
- Swift::Result
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/swift/result.rb
Overview
Result.
Wrapper for command result. It lazily instantiates a new Swift::Record instance for each result row.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(record, result) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(record, result) ⇒ Result
Returns a new instance of Result.
13 14 15 16 |
# File 'lib/swift/result.rb', line 13 def initialize record, result @record = record @result = result end |
Instance Method Details
#each ⇒ Object
18 19 20 21 22 |
# File 'lib/swift/result.rb', line 18 def each @result.each do |tuple| yield @record.load(tuple) end end |