/** * Tae Won Ha - http://taewon.de - @hataewon * See LICENSE */ import Foundation import RxSwift class PrefWindowTransformer: Reducer { typealias Pair = StateActionPair func transform(_ source: Observable) -> Observable { return source.map { pair in var state = pair.state switch pair.action { case .close: state.preferencesOpen = Marked(false) } return StateActionPair(state: state, action: pair.action) } } }