Sha256: 2c149bd12f4135fbd0a3e05d3d567249cf2028f196009c7cd00cd4e83acbb584
Contents?: true
Size: 494 Bytes
Versions: 2
Compression:
Stored size: 494 Bytes
Contents
class Baza::Driver::ActiveRecord::Result < Baza::ResultBase def initialize(driver, result) @result = result @type_translation = driver.baza.opts[:type_translation] end def fetch begin return to_enum.next rescue StopIteration return false end end def each return unless @result @result.each do |result| result = Hash[result.map { |k, v| [k, v.to_s] }] if @type_translation == :string yield result.symbolize_keys end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
baza-0.0.19 | lib/baza/drivers/active_record/result.rb |
baza-0.0.18 | lib/baza/drivers/active_record/result.rb |