2017-06-21 06:18:46 +02:00
|
|
|
//
|
|
|
|
// RSOPMLFeedSpecifier.m
|
2017-06-26 01:32:07 +02:00
|
|
|
// RSParser
|
2017-06-21 06:18:46 +02:00
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 2/28/16.
|
|
|
|
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "RSOPMLFeedSpecifier.h"
|
2017-06-26 01:32:07 +02:00
|
|
|
#import "RSParserInternal.h"
|
2017-06-21 06:18:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
@implementation RSOPMLFeedSpecifier
|
|
|
|
|
|
|
|
- (instancetype)initWithTitle:(NSString *)title feedDescription:(NSString *)feedDescription homePageURL:(NSString *)homePageURL feedURL:(NSString *)feedURL {
|
|
|
|
|
2017-06-25 23:06:01 +02:00
|
|
|
NSParameterAssert(!RSParserStringIsEmpty(feedURL));
|
2017-06-21 06:18:46 +02:00
|
|
|
|
|
|
|
self = [super init];
|
|
|
|
if (!self) {
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
2017-06-25 23:06:01 +02:00
|
|
|
if (RSParserStringIsEmpty(title)) {
|
2017-06-21 06:18:46 +02:00
|
|
|
_title = nil;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
_title = title;
|
|
|
|
}
|
|
|
|
|
2017-06-25 23:06:01 +02:00
|
|
|
if (RSParserStringIsEmpty(feedDescription)) {
|
2017-06-21 06:18:46 +02:00
|
|
|
_feedDescription = nil;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
_feedDescription = feedDescription;
|
|
|
|
}
|
|
|
|
|
2017-06-25 23:06:01 +02:00
|
|
|
if (RSParserStringIsEmpty(homePageURL)) {
|
2017-06-21 06:18:46 +02:00
|
|
|
_homePageURL = nil;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
_homePageURL = homePageURL;
|
|
|
|
}
|
|
|
|
|
|
|
|
_feedURL = feedURL;
|
|
|
|
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|