hash_map 0.3.3 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4012172f5ca69e9686260220452ccdc5f7fd4d2
4
- data.tar.gz: 0a8a23e6add10541e7fb5b0cf81f20c595897d33
3
+ metadata.gz: 50e7e3fbec8b04b63f4014962d9c3eb6c9b36682
4
+ data.tar.gz: 00b4fb3f90c339c8291ce8c132e7827b962bdbdf
5
5
  SHA512:
6
- metadata.gz: f2537edf596a989fd26c3f9bbd99f45fbc2a952187fd6bf80aebc47fdb97f4af2ed086012ec9bd4f7faa134b46b3f25ec5a217a93c9e52a1ae974def8cdb2d50
7
- data.tar.gz: f3982bbf5f523cc049d0e7213f3bda29da840f18176acc56ad6bf1f4253853c1cb35ec3af79764808d6bd62ac165893f1d47c8669c88d6ca6dc9c45c982db0ea
6
+ metadata.gz: 21035218b21db6eb5cda915085f2564db8126829864ae9faf8bc8adf33c8c5038d0766d10eb4b8ccde05e1c716259542bbe22ad6c43bd1772fb32df61e46d4a4
7
+ data.tar.gz: 1845e95b6e6460fc0cd54c1d2edefb6af6f9121976216d2ebfb621ec908bdcad2377a3a746f08b1cdb918fd26a7bc5be3f685263fa5b44993d91e73a7b330926
data/lib/hash_map/dsl.rb CHANGED
@@ -22,6 +22,7 @@ module HashMap
22
22
 
23
23
  class DSL
24
24
  class NoMapperForCollection < StandardError; end
25
+ class InvalidOptionsForProperty < StandardError; end
25
26
  attr_reader :attributes
26
27
 
27
28
  def initialize
@@ -29,6 +30,7 @@ module HashMap
29
30
  end
30
31
 
31
32
  def property(key, opts = {}, &block)
33
+ fail InvalidOptionsForProperty, "[HashMap Error] using: `#{__callee__}` with wrong options, second argument must be a `Hash" unless opts.is_a? Hash
32
34
  new_hash = {}.tap { |h| h[:key] = single_to_ary(key) }
33
35
  new_hash[:proc] = block if block
34
36
  new_hash[:from] = generate_from(new_hash, opts)
@@ -1,3 +1,3 @@
1
1
  module HashMap
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Pañach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-24 00:00:00.000000000 Z
11
+ date: 2016-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.2.3
112
+ rubygems_version: 2.4.6
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Library to map easily hashes.