uddf 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module UDDF
4
+ module Base
5
+ module Models
6
+ ##
7
+ # Inside <address> the own (<owner> element) address data,
8
+ # or that of dive buddies (<buddy> element),
9
+ # or that of a shop (<shop> element) etc., are given.
10
+ class Address
11
+ include HappyMapper
12
+
13
+ tag "address"
14
+
15
+ has_one :street, String
16
+ has_one :city, String
17
+ has_one :postcode, String
18
+ has_one :country, String
19
+ has_one :province, String
20
+ end
21
+
22
+ ##
23
+ # Inside <contact> data concerning getting in touch with some one are
24
+ # given, like phone number, email address, language etc.
25
+ class Contact
26
+ include HappyMapper
27
+
28
+ tag "contact"
29
+
30
+ has_many :emails, String, tag: "email"
31
+ has_many :faxes, String, tag: "fax"
32
+ has_many :homepages, String, tag: "homepage"
33
+ has_many :languages, String, tag: "language"
34
+ has_many :mobile_phones, String, tag: "mobilephone"
35
+ has_many :phones, String, tag: "phone"
36
+ end
37
+ end
38
+ end
39
+ end