easymongo 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/easymongo.gemspec +1 -1
- data/lib/easymongo/document.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d612fc89a257596fd35e80f1629e5550cdbfb17
|
4
|
+
data.tar.gz: 26836d20c334424a8810fabb07ebb4a964ad4e0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 309ee8e6905648d77883c91d7b98a6d497cfa34abf9721b1d01cc8cde1b127445dbae9114bb5e8a0639855e10bcc7774449fa3e3449ccdb3b100b2f2775e1ff4
|
7
|
+
data.tar.gz: 91c0275971f8151fde13623270395505929edaf99fcd678236b82a5152633fff82f5fa59ed29d976554aa1d3f8c14185e150a1bc9d276866fcd1d4d1c11b9320
|
data/CHANGELOG.md
CHANGED
data/easymongo.gemspec
CHANGED
data/lib/easymongo/document.rb
CHANGED
@@ -4,7 +4,7 @@ module Easymongo
|
|
4
4
|
class Document
|
5
5
|
|
6
6
|
# Takes a BSON::Document
|
7
|
-
def initialize(doc)
|
7
|
+
def initialize(doc = {})
|
8
8
|
|
9
9
|
# Replace _id with id
|
10
10
|
doc['id'] = doc.delete('_id')
|
@@ -39,7 +39,7 @@ module Easymongo
|
|
39
39
|
|
40
40
|
# Dynamically write value
|
41
41
|
def method_missing(name, *args, &block)
|
42
|
-
return attr(name[0..-2], args
|
42
|
+
return attr(name[0..-2], args[0]) if args.size == 1 and name[-1] == '='
|
43
43
|
end
|
44
44
|
|
45
45
|
private
|