Rename OPMLFeedSpecifier to ParsedOPMLFeedSpecifier.

This commit is contained in:
Brent Simmons 2024-08-23 18:03:59 -07:00
parent 2d3c34f96a
commit 321339186f
2 changed files with 26 additions and 50 deletions

View File

@ -1,40 +0,0 @@
//
// File.swift
//
//
// Created by Brent Simmons on 8/18/24.
//
import Foundation
public struct OPMLFeedSpecifier: Sendable {
let title: String?
let feedDescription: String?
let homePageURL: String?
let feedURL: String
init(title: String?, feedDescription: String?, homePageURL: String?, feedURL: String) {
if String.isEmptyOrNil(title) {
self.title = nil
} else {
self.title = title
}
if String.isEmptyOrNil(feedDescription) {
self.feedDescription = nil
} else {
self.feedDescription = feedDescription
}
if String.isEmptyOrNil(homePageURL) {
self.homePageURL = nil
} else {
self.homePageURL = homePageURL
}
self.feedURL = feedURL
}
}

View File

@ -1,6 +1,6 @@
//
// ParsedOPMLFeedSpecifier.swift
//
//
//
// Created by Brent Simmons on 8/18/24.
//
@ -9,16 +9,32 @@ import Foundation
public struct ParsedOPMLFeedSpecifier: Sendable {
public let title: String?
public let feedDescription: String?
public let homePageURL: String?
public let feedURL: String
let title: String?
let feedDescription: String?
let homePageURL: String?
let feedURL: String
init(_ opmlFeedSpecifier: OPMLFeedSpecifier) {
init(title: String?, feedDescription: String?, homePageURL: String?, feedURL: String) {
self.title = opmlFeedSpecifier.title
self.feedDescription = opmlFeedSpecifier.feedDescription
self.homePageURL = opmlFeedSpecifier.homePageURL
self.feedURL = opmlFeedSpecifier.feedURL
if String.isEmptyOrNil(title) {
self.title = nil
} else {
self.title = title
}
if String.isEmptyOrNil(feedDescription) {
self.feedDescription = nil
} else {
self.feedDescription = feedDescription
}
if String.isEmptyOrNil(homePageURL) {
self.homePageURL = nil
} else {
self.homePageURL = homePageURL
}
self.feedURL = feedURL
}
}