dolly 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dolly/document.rb +3 -1
- data/lib/dolly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a6f4cc93cbfb6e3efc584188c23775282d6bd95
|
4
|
+
data.tar.gz: 2bf8db9298eee2e91925d1edc9e1536e1ce435db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90b551dbf530f8e36fa6f35e1ab307478096514db83bd78d603e4bdf62e93aedcb7c5d6b4a0c4822d5ff171f5521c306f60c477620a76b5df72c583d4e447f2b
|
7
|
+
data.tar.gz: 2a3e019741cb1e7d6b193537bcce6bb8ade95b9a4231a40b27e094b4254bd47ac054f95fbe6d985d3232843ea75cc771a5bda35fc03755dbc77c7514805cecfa
|
data/lib/dolly/document.rb
CHANGED
@@ -86,12 +86,14 @@ module Dolly
|
|
86
86
|
options ||= {}
|
87
87
|
self.properties ||= []
|
88
88
|
|
89
|
+
default_value = options[:default]
|
90
|
+
|
89
91
|
self.properties += ary.map do |name|
|
90
92
|
options.merge!({name: name})
|
91
93
|
property = Property.new(options)
|
92
94
|
|
93
95
|
define_method(name) do
|
94
|
-
property.value = @doc[name.to_s]
|
96
|
+
property.value = @doc[name.to_s] || default_value
|
95
97
|
property.value
|
96
98
|
end
|
97
99
|
|
data/lib/dolly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dolly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- javierg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|