geo_hex 3.1.2 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module GeoHex
2
- VERSION = "3.1.2".freeze
2
+ VERSION = "3.1.3".freeze
3
3
  end
data/lib/geo_hex/zone.rb CHANGED
@@ -72,7 +72,7 @@ module GeoHex
72
72
 
73
73
  x0.upto(xn) do |xi|
74
74
  zones << self.class.new(xi, y+i, level)
75
- zones << self.class.new(xi-1, y-i, level)
75
+ zones << self.class.new(xi-i, y-i, level)
76
76
  end
77
77
  end
78
78
 
@@ -99,6 +99,11 @@ module GeoHex
99
99
  [x, y, level].hash
100
100
  end
101
101
 
102
+ # @return [Array] x, y & level tuple
103
+ def to_a
104
+ [x, y, level]
105
+ end
106
+
102
107
  protected
103
108
 
104
109
  # @param [String] code the GeoHex code
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_hex
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-06 00:00:00.000000000 Z
12
+ date: 2012-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -65,13 +65,13 @@ executables: []
65
65
  extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
- - lib/geo_hex/unit.rb
68
+ - lib/geo_hex.rb
69
69
  - lib/geo_hex/ll.rb
70
- - lib/geo_hex/polygon.rb
71
- - lib/geo_hex/version.rb
72
- - lib/geo_hex/pp.rb
73
70
  - lib/geo_hex/zone.rb
74
- - lib/geo_hex.rb
71
+ - lib/geo_hex/pp.rb
72
+ - lib/geo_hex/version.rb
73
+ - lib/geo_hex/polygon.rb
74
+ - lib/geo_hex/unit.rb
75
75
  homepage: https://github.com/bsm/geo_hex
76
76
  licenses: []
77
77
  post_install_message:
@@ -97,3 +97,4 @@ signing_key:
97
97
  specification_version: 3
98
98
  summary: GeoHex (V3)
99
99
  test_files: []
100
+ has_rdoc: