mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-27 10:02:37 +01:00
51 lines
909 B
Objective-C
Executable File
51 lines
909 B
Objective-C
Executable File
//
|
|
// RSOPMLFeedSpecifier.m
|
|
// RSParser
|
|
//
|
|
// Created by Brent Simmons on 2/28/16.
|
|
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
|
//
|
|
|
|
#import <RSParser/RSOPMLFeedSpecifier.h>
|
|
#import <RSParser/RSParserInternal.h>
|
|
|
|
|
|
@implementation RSOPMLFeedSpecifier
|
|
|
|
- (instancetype)initWithTitle:(NSString *)title feedDescription:(NSString *)feedDescription homePageURL:(NSString *)homePageURL feedURL:(NSString *)feedURL {
|
|
|
|
NSParameterAssert(!RSParserStringIsEmpty(feedURL));
|
|
|
|
self = [super init];
|
|
if (!self) {
|
|
return nil;
|
|
}
|
|
|
|
if (RSParserStringIsEmpty(title)) {
|
|
_title = nil;
|
|
}
|
|
else {
|
|
_title = title;
|
|
}
|
|
|
|
if (RSParserStringIsEmpty(feedDescription)) {
|
|
_feedDescription = nil;
|
|
}
|
|
else {
|
|
_feedDescription = feedDescription;
|
|
}
|
|
|
|
if (RSParserStringIsEmpty(homePageURL)) {
|
|
_homePageURL = nil;
|
|
}
|
|
else {
|
|
_homePageURL = homePageURL;
|
|
}
|
|
|
|
_feedURL = feedURL;
|
|
|
|
return self;
|
|
}
|
|
|
|
@end
|