This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Multiple variable safety definitions | |
*/ | |
fun <T1: Any, T2: Any, R: Any> safeLet(p1: T1?, p2: T2?, block: (T1, T2)->R?): R? { | |
return if (p1 != null && p2 != null) block(p1, p2) else null | |
} | |
fun <T1: Any, T2: Any, T3: Any, R: Any> safeLet(p1: T1?, p2: T2?, p3: T3?, block: (T1, T2, T3)->R?): R? { | |
return if (p1 != null && p2 != null && p3 != null) block(p1, p2, p3) else null | |
} | |
fun <T1: Any, T2: Any, T3: Any, T4: Any, R: Any> safeLet(p1: T1?, p2: T2?, p3: T3?, p4: T4?, block: (T1, T2, T3, T4)->R?): R? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Parser.swift | |
// YellowPod | |
// | |
// Created by Luis Burgos on 11/26/17. | |
// Copyright © 2017 YellowPod. All rights reserved. | |
// | |
import Foundation | |
import SwiftyJSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UserParser.swift | |
// Tripstr | |
// | |
// Created by Luis Burgos on 11/24/17. | |
// Copyright © 2017 Tripstr. All rights reserved. | |
// | |
import Foundation | |
import SwiftyJSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// User.swift | |
// YellowPod | |
// | |
// Created by Luis Burgos on 12/5/17. | |
// Copyright © 2017 Yellowme. All rights reserved. | |
// | |
import Foundation | |
import SwiftyJSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// RemoteDataSource.swift | |
// YellowPod | |
// | |
// Created by Luis Burgos on 11/24/17. | |
// Copyright © 2017 YellowPod. All rights reserved. | |
// | |
import Foundation | |
import Alamofire | |
import SwiftyJSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Networking.swift | |
// YellowPod | |
// | |
// Created by Luis Burgos on 11/25/17. | |
// Copyright © 2017 YellowPod. All rights reserved. | |
// | |
import Foundation | |
import SwiftyJSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Networking+Keys.swift | |
// YellowPod | |
// | |
// Created by Luis Burgos on 11/26/17. | |
// Copyright © 2017 YellowPod. All rights reserved. | |
// | |
import Foundation | |
//HERE: Define here all the keys for JSON models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// APIModel.swift | |
// YellowPod | |
// | |
// Created by Luis Burgos on 11/25/17. | |
// Copyright © 2017 YellowPod. All rights reserved. | |
// | |
import Foundation | |
import SwiftyJSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NotificationItemDecorator { | |
var notification: Notification? | |
func with(_ notification: Notification) -> NotificationItemDecorator { | |
self.notification = notification | |
return self | |
} | |
func add(confirm: UIButton?) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Helper class which provides methods to being, redirect, start and finish activities. | |
*/ | |
public class ActivityHelper { | |
/** | |
* The {@code fragment} is added to the container view with id {@code frameId}. The operation is | |
* performed by the {@code fragmentManager}. | |
* | |
*/ |