//
// Route.m
// Project
//
// Created by Ziv on 2017/4/10.
//
//

#import "Route.h"

@implementation Route

#pragma mark - Protect

- (NSString *)shortName {
	if (self.name) {
		NSArray *names = [self.name componentsSeparatedByString:@" -> "];
		return [NSString stringWithFormat:@"%@ -> %@", names.firstObject, names.lastObject];
	}
	return nil;
}

-(NSArray *)schedules{
    if (self.stopSchedules) {
        _schedules = self.stopSchedules;
    }
    return _schedules;
}

@end
