mapping 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mapping/object_model.rb +9 -1
- data/lib/mapping/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: 518729390fbe28863bc436cefe3393ec40d10a87
|
4
|
+
data.tar.gz: e4f1954ce1c52b3081b6e660566cf92ae2116380
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fbd2d73f546d8ebde886914c10d2ec4e7b6828553d3411b014833864b3a398bc3f1ad5e9bb037c15ec283e2c1d33adffe7139e62c66d6ba915217f092ff414e
|
7
|
+
data.tar.gz: e89ea99b339695029eebb3ae0daa4008579dd287ff55ef98a5a00eb7f58aff566c9bc4c808d133cd613b50b64499440a1b0d6482a8a66be821108eed9e50b191
|
data/lib/mapping/object_model.rb
CHANGED
@@ -23,7 +23,15 @@ require_relative 'model'
|
|
23
23
|
module Mapping
|
24
24
|
# Provides a useful starting point for object based mappings. Handles, true, false, nil, Array and Hash by default, simply by passing through.
|
25
25
|
class ObjectModel < Model
|
26
|
-
map_identity(NilClass, TrueClass, FalseClass,
|
26
|
+
map_identity(NilClass, TrueClass, FalseClass, Float, Rational, String)
|
27
|
+
|
28
|
+
if 0.class == Integer
|
29
|
+
# Ruby 2.4+ Integer unification
|
30
|
+
map_identity(Integer)
|
31
|
+
else
|
32
|
+
# Ruby < 2.4
|
33
|
+
map_identity(Fixnum, Bignum)
|
34
|
+
end
|
27
35
|
|
28
36
|
map(Array) do |items|
|
29
37
|
items.collect{|object| map(object)}
|
data/lib/mapping/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mapping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.6.10
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Map an input model to an output model using a mapping model.
|