dynamodb_geo 0.1.8 → 0.2.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
  SHA256:
3
- metadata.gz: c08fcea2ee6831194cf0bdaa030f5fde0fcf57e54a36e9e5347adffc40ded893
4
- data.tar.gz: 1d67d6d7e8b8dc0ac155033f54d359b259692cfb074f8a447bed5dae4e9926b4
3
+ metadata.gz: 5585912cbe804676b364ed0479bdd68aad683550502a17517124c567e611b2b8
4
+ data.tar.gz: 95177885630267acddf06e386888331d0951577203837a82e03303a6a9873959
5
5
  SHA512:
6
- metadata.gz: 448bd154bbf2205255c7b3ab62e0d6080e19f084e361e1242ef62a979b0fd7d18411d3c6aaf34edec27245f38d3239c280c07a7d07bc98835c02925df70292c0
7
- data.tar.gz: 04c1d9a11d142ac70c51b98b267a42e8cbf3f55fd375f023940d569c53f68e558f886741925153c57b70a5524332569a0c0cef4143118c63f4f87d0bca2c22f6
6
+ metadata.gz: 76b27bb7675df86c7bcbaab037cd925ae0b38d5d7b02634dd596776d039c7af22377c3cc2f868afa07d6e86260b632ea112c404efbffffcb9c815c10ff263002
7
+ data.tar.gz: 4bb8c017c50005483deabac163d9df33bfbb3ac6b43522444fc9cc8c9ef24a4ec675d072282fe8635787c4e48731c57396335a0350217b125530e93d173e6471
@@ -1,5 +1,5 @@
1
1
  module DynamodbGeo
2
2
  class Version
3
- STRING = '0.1.8'
3
+ STRING = '0.2.0'
4
4
  end
5
5
  end
@@ -13,4 +13,13 @@ class Store
13
13
  @geohash = store_data[:geohash] || Geohash.encode(lat, long, 10)
14
14
  @uuid = store_data[:uuid]
15
15
  end
16
+
17
+ def to_h
18
+ temp = instance_variables.map do |v|
19
+ value = self.send(v.to_s.sub('@',''))
20
+ value = value.class == BigDecimal ? value.to_f : value
21
+ Hash[v.to_s.sub('@','').to_sym, value]
22
+ end
23
+ Hash[*temp.collect{|h| h.to_a}.flatten]
24
+ end
16
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamodb_geo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ahn
@@ -127,7 +127,7 @@ requirements: []
127
127
  rubygems_version: 3.1.2
128
128
  signing_key:
129
129
  specification_version: 4
130
- summary: dynamodb_geo-0.1.8
130
+ summary: dynamodb_geo-0.2.0
131
131
  test_files:
132
132
  - spec/dynamodb_geo_spec.rb
133
133
  - spec/geohash_spec.rb