mirror of
https://github.com/tappollo/makata.git
synced 2026-01-12 17:03:04 +08:00
17 lines
341 B
Swift
17 lines
341 B
Swift
// protocol-attributable.swift
|
|
//
|
|
// Code Copyright Buslo Collective
|
|
// Created 2/3/23
|
|
|
|
import Foundation
|
|
|
|
public protocol Attributable: AnyObject {}
|
|
|
|
public extension Attributable {
|
|
func attribute<Value>(on: ReferenceWritableKeyPath<Self, Value>, _ value: Value) -> Self {
|
|
self[keyPath: on] = value
|
|
|
|
return self
|
|
}
|
|
}
|