hbasegate 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,8 @@ module HBaseGate
6
6
  java_import 'org.apache.hadoop.hbase.client.Scan'
7
7
 
8
8
  class HTable
9
+ include Enumerable
10
+
9
11
  alias_method :original_delete, :delete
10
12
  alias_method :original_get, :get
11
13
  alias_method :original_put, :put
@@ -35,6 +37,11 @@ module HBaseGate
35
37
  original_delete(delete)
36
38
  end
37
39
 
40
+ # Enable the Enumerable module by providing a full scanner.
41
+ def each
42
+ original_get_scanner(Scan.new).each { |row| yield row }
43
+ end
44
+
38
45
  # Create a scanner for the table.
39
46
  def get_scanner(start_row = nil, stop_row = nil)
40
47
  scan = case
@@ -1,3 +1,3 @@
1
1
  module HBaseGate
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hbasegate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: