//
//  Ashton.swift
//  Ashton
//
//  Created by Michael Schwarz on 16.09.17.
//  Copyright © 2017 Michael Schwarz. All rights reserved.
//

import Foundation


/// Transforms NSAttributedString <--> HTML
@objc
public final class Ashton: NSObject {

    public typealias HTML = String

    private static let reader = AshtonHTMLReader()
    private static let writer = AshtonHTMLWriter()

    @objc
    public static func encode(_ attributedString: NSAttributedString) -> HTML {
        return Ashton.writer.encode(attributedString)
    }

    @objc
    public static func decode(_ html: HTML, defaultAttributes: [NSAttributedStringKey: Any] = [:]) -> NSAttributedString {
        return Ashton.reader.decode(html, defaultAttributes: defaultAttributes)
    }

    @objc
    public static func clearCaches() {
        Ashton.reader.clearCaches()
    }
}

//
//  Ashton.swift
//  Ashton
//
//  Created by Michael Schwarz on 16.09.17.
//  Copyright © 2017 Michael Schwarz. All rights reserved.
//

import Foundation


/// Transforms AttributedString into HTML in both directions
@objc
public final class Ashton: NSObject {

    public typealias HTML = String

    private static let reader = AshtonHTMLReader()
    private static let writer = AshtonHTMLWriter()

    @objc
    public static func encode(_ attributedString: NSAttributedString) -> HTML {
        return Ashton.writer.encode(attributedString)
    }

    @objc
    public static func decode(_ html: HTML, defaultAttributes: [NSAttributedStringKey: Any] = [:]) -> NSAttributedString {
        return Ashton.reader.decode(html, defaultAttributes: defaultAttributes)
    }

    public static func clearCaches() {
        Ashton.reader.clearCaches()
    }
}

--- 
+++ 
@@ -9,7 +9,7 @@
 import Foundation
 
 
-/// Transforms AttributedString into HTML in both directions
+/// Transforms NSAttributedString <--> HTML
 @objc
 public final class Ashton: NSObject {
 
@@ -28,6 +28,7 @@
         return Ashton.reader.decode(html, defaultAttributes: defaultAttributes)
     }
 
+    @objc
     public static func clearCaches() {
         Ashton.reader.clearCaches()
     }
Add missing @objc annotation to clear caches method
