//
//  AstroMethodShimInstaller.swift
//  Astro
//
//  Created by Mark Sandstrom on 5/4/15.
//  Copyright (c) 2015 Mobify Research & Development Inc. All rights reserved.
//
import Foundation
@testable import Astro

@objc
class AstroMethodShimInstaller: MethodShimInstaller {
    required init() {}

    override func installShims(_ instance: AnyObject) {
        if let instance = instance as? TestBaseShimMessageReceiver {
            instance.addRpcMethodShim("method1") { _, respond in
                instance.method1(respond)
            }
        }
        if let instance = instance as? TestInheritedShimMessageReceiver {
            instance.addRpcMethodShim("method2") { _, respond in
                instance.method2(respond)
            }
        }
    }
}
