occams-record 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e3dd68bf71573d7c7d69b5ec5ac6bc9fcee04a3
4
- data.tar.gz: a8fffb0ad9a3d03d725753f260ffe168f8290624
3
+ metadata.gz: 7363e28e8ba4c2d1fbbec8ea67e9cdbcfc9b1645
4
+ data.tar.gz: 5878b150352c20bcce6e88c831d361402c04e3ec
5
5
  SHA512:
6
- metadata.gz: 5358439480d4ad1cdd15635610b79bc389e1ca3cb32dd07292f54295bfa040e1c6e6f4f668f838e166ff3cf1396f0ff35096952df77aa4eaa999875083a812c8
7
- data.tar.gz: 3d6396a193b98e4adc84c2e231329b02e1e02d479e65d7c46145375b99ba95f0aa0eca77feb3c16680325da08e2cd1c8c5e9bb350497428fb342fbe8ac77059e
6
+ metadata.gz: 7b9f69f663aed9de81807318203acc190930c29eff65e0c8dd82a6d3740f85cd6716ac0a8c588b67a082c5b93f6467fa76513be582c20f0f730b33410aeb4700
7
+ data.tar.gz: b041632604fddd68ee0249e235b92973da897a4a1aefa7f312b18b58a856f2471c0d29506421aa0fbbce30fe8c5b71d99d443024c64f68304672baab74e43be9
@@ -100,5 +100,21 @@ module OccamsRecord
100
100
 
101
101
  rows
102
102
  end
103
+
104
+ alias_method :to_a, :run
105
+
106
+ #
107
+ # If you pass a block, each result row will be yielded to it. If you don't,
108
+ # an Enumerable will be returned.
109
+ #
110
+ # @return Enumerable
111
+ #
112
+ def each
113
+ if block_given?
114
+ to_a.each { |row| yield row }
115
+ else
116
+ to_a.each
117
+ end
118
+ end
103
119
  end
104
120
  end
@@ -3,5 +3,5 @@
3
3
  #
4
4
  module OccamsRecord
5
5
  # Library version
6
- VERSION = '0.4.1'.freeze
6
+ VERSION = '0.5.0'.freeze
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: occams-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Hollinger