datory 1.0.0.rc7 → 1.0.0.rc8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -7
- data/lib/datory/attributes/dsl.rb +0 -20
- data/lib/datory/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b052892a1fc08acc5ffb825f3dc14eaca5d28f715850e7f8e54b9c594a419d9
|
4
|
+
data.tar.gz: 6d87e60a4bd9ce2a4972091950010bb4908b921f7489ce2d728515c45666a98c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675cd69f300045e6bcdd58ea9c24b402fd0c652a30c0fff78dbc73b45635d405f9c5598a45696bb967cc890c94c97a1f7e6e50bcaf8b7275a6bf518656ccfe63
|
7
|
+
data.tar.gz: b40b64a011b064e3222612d36d13c2309d975078dcfcdc20c903cb5e3d407b048b25ef54361e83bcd602ac5fdd5a67cc6353dae0bf36a5e542d70afec2b3b0fb
|
data/README.md
CHANGED
@@ -36,30 +36,34 @@ UserDto.deserialize(json)
|
|
36
36
|
```ruby
|
37
37
|
class UserDto < Datory::Base
|
38
38
|
uuid :id
|
39
|
+
|
39
40
|
string :firstname, to: :first_name
|
40
41
|
string :lastname, to: :last_name
|
42
|
+
|
41
43
|
string :email
|
44
|
+
string :phone
|
45
|
+
string :website
|
46
|
+
|
42
47
|
string :birthDate, to: :birth_date, as: Date
|
43
48
|
|
44
49
|
one :login, include: UserLoginDto
|
50
|
+
one :company, include: UserCompanyDto
|
45
51
|
|
46
52
|
many :addresses, include: UserAddressDto
|
47
|
-
|
48
|
-
string :phone
|
49
|
-
string :website
|
50
|
-
|
51
|
-
one :company, include: UserCompanyDto
|
52
53
|
end
|
53
54
|
```
|
54
55
|
|
55
56
|
```ruby
|
56
57
|
class UserLoginDto < Datory::Base
|
57
|
-
|
58
|
+
uuid :id
|
59
|
+
|
58
60
|
string :username
|
59
61
|
string :password
|
62
|
+
|
60
63
|
string :md5
|
61
64
|
string :sha1
|
62
|
-
|
65
|
+
|
66
|
+
string :registered_at, as: DateTime
|
63
67
|
end
|
64
68
|
```
|
65
69
|
|
@@ -40,11 +40,6 @@ module Datory
|
|
40
40
|
|
41
41
|
########################################################################
|
42
42
|
|
43
|
-
def symbol(name, **options)
|
44
|
-
options = options.merge(from: Symbol)
|
45
|
-
attribute(name, **options)
|
46
|
-
end
|
47
|
-
|
48
43
|
def string(name, **options)
|
49
44
|
options = options.merge(from: String)
|
50
45
|
attribute(name, **options)
|
@@ -60,21 +55,6 @@ module Datory
|
|
60
55
|
attribute(name, **options)
|
61
56
|
end
|
62
57
|
|
63
|
-
def date(name, **options)
|
64
|
-
options = options.merge(from: Date)
|
65
|
-
attribute(name, **options)
|
66
|
-
end
|
67
|
-
|
68
|
-
def time(name, **options)
|
69
|
-
options = options.merge(from: Time)
|
70
|
-
attribute(name, **options)
|
71
|
-
end
|
72
|
-
|
73
|
-
def datetime(name, **options)
|
74
|
-
options = options.merge(from: DateTime)
|
75
|
-
attribute(name, **options)
|
76
|
-
end
|
77
|
-
|
78
58
|
########################################################################
|
79
59
|
|
80
60
|
def collection_of_attributes
|
data/lib/datory/version.rb
CHANGED