Skip to content

Instantly share code, notes, and snippets.

View abossard's full-sized avatar

Andre Bossard abossard

View GitHub Profile
@abossard
abossard / ArrayTransform.swift
Created July 25, 2016 14:21 — forked from Jerrot/ArrayTransform.swift
Transform arrays with ObjectMapper to Realm's List type
// Based on Swift 1.2, ObjectMapper 0.15, RealmSwift 0.94.1
// Author: Timo Wälisch <timo@waelisch.de>
import UIKit
import RealmSwift
import ObjectMapper
import SwiftyJSON
class ArrayTransform<T:RealmSwift.Object where T:Mappable> : TransformType {
typealias Object = List<T>
input {
stdin {
type => "stdin-type"
}
syslog {
type => syslog
port => 514
}
file {
type => "syslog"