Skip to content

Commit

Permalink
GPXEmail improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentneo committed Jul 5, 2019
1 parent c3416d9 commit 82019ab
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/GPXEmail.swift
Expand Up @@ -22,6 +22,9 @@ open class GPXEmail: GPXElement {
/// Domain refers to the back part of the email address, after the **@**
public var domain: String?

/// Full email as a string.
public var fullAddress: String?

// MARK:- Instance

public required init() {
Expand Down Expand Up @@ -53,6 +56,11 @@ open class GPXEmail: GPXElement {
init(dictionary: [String : String]) {
self.emailID = dictionary["id"]
self.domain = dictionary["domain"]

guard let id = dictionary["id"] else { return }
guard let domain = dictionary["domain"] else { return }
self.fullAddress = id + "@" + domain

}

// MARK:- Tag
Expand Down

0 comments on commit 82019ab

Please sign in to comment.