This file contains hidden or 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 OnlineProvider<Target> where Target: Moya.TargetType { | |
| fileprivate let provider: MoyaProvider<Target> | |
| fileprivate let reachabilityManager: ReachabilityManager | |
| private let authManager: AuthManager | |
| init(endpointClosure: @escaping MoyaProvider<Target>.EndpointClosure = MoyaProvider<Target>.defaultEndpointMapping, | |
| requestClosure: @escaping MoyaProvider<Target>.RequestClosure = MoyaProvider<Target>.defaultRequestMapping, | |
| stubClosure: @escaping MoyaProvider<Target>.StubClosure = MoyaProvider<Target>.neverStub, |
This file contains hidden or 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
| git: git_checkout_branch | |
| echo "🎉🎊🎁 DONE!!! Enjoy from @AdieOlami" | |
| show_dir: | |
| @echo "*****************************************************************"; \ | |
| echo "\nYour current working directory is \n🏡" `pwd`; \ | |
| echo "\n*****************************************************************"; | |
| git_checkout_branch: show_dir | |
| @read -p "🆘 Do you want to create a new Branch y/n: " -n 1 -r; \ |
This file contains hidden or 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 MyInfoViewModel: ViewModel, ViewModelType { | |
| struct Input { | |
| let trigger: Observable<Void> | |
| let segmentSelection: Observable<EventSegments> | |
| let selection: Driver<MyInfoSectionItem> | |
| let deleted: Driver<MyInfoSectionItem> | |
| } | |
| struct Output { |
This file contains hidden or 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
| import UIKit | |
| import GooglePlaces | |
| class PlaceSearchField: UITextField, UITextFieldDelegate { | |
| //MARK: - PROPERTIES | |
| /// Instance of autoCompleteTableView | |
| fileprivate var autoCompleteTableView: UITableView? | |
| /// Gives the array of autoCompletePlacesData | |
| open var autoCompletePlacesData = [String]() |
This file contains hidden or 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
| extension Observable { | |
| /// handle the network response and map to JSON | |
| /// - returns: Observable<JSON> | |
| func handleResponseMapJSON() -> Observable<Result<JSON, ORMError>> { | |
| return self.map { representor in | |
| guard let response = representor as? Moya.Response else { | |
| return .failure(ORMError.ORMNoRepresentor) |