hash_map 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hash_map/dsl.rb +2 -0
- data/lib/hash_map/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50e7e3fbec8b04b63f4014962d9c3eb6c9b36682
|
4
|
+
data.tar.gz: 00b4fb3f90c339c8291ce8c132e7827b962bdbdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/hash_map/version.rb
CHANGED
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.
|
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:
|
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.
|
112
|
+
rubygems_version: 2.4.6
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Library to map easily hashes.
|