[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/opensourceios/Coding-iOS/master/Coding_iOS/Models/CodeTree.m [Back]  [Original]

//
//  CodeTree.m
//  Coding_iOS
//
//  Created by   on 14/10/29.
//  Copyright (c) 2014 Coding. All rights reserved.
//

#import "CodeTree.h"

@implementation CodeTree
- (instancetype)init
{
    self = [super init];
    if (self) {
        _propertyArrayMap = [NSDictionary dictionaryWithObjectsAndKeys:
                             @"CodeTree_File", @"files", nil];
        _commitInfos = nil;
        _isLoading = NO;
    }
    return self;
}
+ (CodeTree *)codeTreeMaster{
    return [CodeTree codeTreeWithRef:@"master" andPath:@""];
}
+ (CodeTree *)codeTreeWithRef:(NSString *)ref andPath:(NSString *)path{
    CodeTree *codeTree = [[CodeTree alloc] init];
    codeTree.ref = ref.length > 0? ref: @"master";
    codeTree.path = path;
    return codeTree;
}
- (NSString *)path{
    if (!_path) {
        _path = @"";
    }
    return _path;
}
- (NSString *)ref{
    if (!_ref) {
        _ref = @"master";
    }
    return _ref;
}
- (void)configWithCommitInfos:(NSArray *)infos{
    if (!infos || infos.count 

Web Proxy Viewer  |  New URL  |  Original Page