Skip to content

Commit 82019ab

Browse files
committed
GPXEmail improvements
1 parent c3416d9 commit 82019ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Classes/GPXEmail.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ open class GPXEmail: GPXElement {
2222
/// Domain refers to the back part of the email address, after the **@**
2323
public var domain: String?
2424

25+
/// Full email as a string.
26+
public var fullAddress: String?
27+
2528
// MARK:- Instance
2629

2730
public required init() {
@@ -53,6 +56,11 @@ open class GPXEmail: GPXElement {
5356
init(dictionary: [String : String]) {
5457
self.emailID = dictionary["id"]
5558
self.domain = dictionary["domain"]
59+
60+
guard let id = dictionary["id"] else { return }
61+
guard let domain = dictionary["domain"] else { return }
62+
self.fullAddress = id + "@" + domain
63+
5664
}
5765

5866
// MARK:- Tag

0 commit comments

Comments
 (0)