xsys 0.0.25 → 0.0.26
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 -1
- data/lib/xsys/model/transaction.rb +1 -1
- data/lib/xsys/model/transaction_item.rb +1 -9
- data/lib/xsys/version.rb +1 -1
- 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: 6392758c78a73b5c467942fd49265794c8037f86
|
4
|
+
data.tar.gz: 5f2b0293a33643ab9d7511e1e4a4e4c3679a3680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1ccf18b792a7bc9248d7053e320a8ac53516a7c016b1c5ed2a0ccc0fcf269dcf69d27902aae53abec4bc810e159062c1be6439734e2fe623cb6abfe0b72e34f
|
7
|
+
data.tar.gz: 805c025d031fe52c028182f058a37686b7989fe30a34e2f6a322debd96bef2bd8427ae5ae38df0d748eb056c535ea1074bed3e00ad2693a05fbc6ae4953ffe84
|
data/CHANGELOG.md
CHANGED
@@ -12,7 +12,7 @@ module Xsys
|
|
12
12
|
if k.to_s == 'transaction_date'
|
13
13
|
self.transaction_date = Date.parse(v) unless v.nil?
|
14
14
|
elsif k.to_s == 'user'
|
15
|
-
self.user = User.new(v)
|
15
|
+
self.user = User.new(v) unless v.nil?
|
16
16
|
elsif k.to_s == 'items'
|
17
17
|
self.items = v.map { |x| TransactionItem.new(x) }
|
18
18
|
else
|
@@ -7,15 +7,7 @@ module Xsys
|
|
7
7
|
|
8
8
|
def initialize(attributes={})
|
9
9
|
attributes.each do |k,v|
|
10
|
-
if k
|
11
|
-
self.transaction_date = Date.parse(v) unless v.nil?
|
12
|
-
elsif k.to_s == 'user'
|
13
|
-
self.user = User.new(v)
|
14
|
-
elsif k.to_s == 'items'
|
15
|
-
self.items = v.map { |x| TransactionItem.new(x) }
|
16
|
-
else
|
17
|
-
self.send("#{k}=", v) if self.respond_to?(k)
|
18
|
-
end
|
10
|
+
self.send("#{k}=", v) if self.respond_to?(k)
|
19
11
|
end
|
20
12
|
end
|
21
13
|
end
|
data/lib/xsys/version.rb
CHANGED