Skip to content
Snippets Groups Projects
Commit 634a705e authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Define protocol in template for getter and setter extensions

parent 009219f4
Branches
Tags 1.1.0
No related merge requests found
......@@ -5,6 +5,12 @@
// swiftlint:disable sorted_imports
import Foundation
protocol ValueAccessible {
func setValueByKey(key: String, value: Any?)
func getValueByKey(key: String) -> Any?
}
// swiftlint:disable attributes file_length vertical_whitespace_closing_braces
// swiftlint:disable identifier_name line_length type_body_length
{% for class in classes %}
......@@ -15,7 +21,7 @@ class {{class.name}}_
{% endfor %}
}
extension {{class.name}}
extension {{class.name}} {% if not class.needsMethodOverride %}: ValueAccessible {% endif %}
{
@objc {% if class.needsMethodOverride %} override {% endif %} func setValueByKey(key: String, value: Any?)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment