Update helper functions

This commit is contained in:
Marcus Kammer 2024-10-04 16:34:28 +02:00
parent 310dc571e2
commit 62e7885f1d
Signed by: marcuskammer
GPG key ID: C374817BE285268F

View file

@ -114,10 +114,10 @@
(defun remove-as2-postfix (string)
"Remove the '-as2' prefix from the given string."
(remove-postfix "-as2" string))
(remove-postfix "-as2" (string-downcase string)))
(defun prepare-property-key (name)
(kebab-camel (remove-as2-postfix (string-downcase (symbol-name name)))))
(kebab-camel (remove-as2-postfix (string (symbol-name name)))))
(defclass property-container ()
((properties :initform (make-hash-table :test #'equal)
@ -125,7 +125,7 @@
(defmethod initialize-instance :after ((obj property-container) &key)
(setf (gethash "type" (properties obj))
(kebab-camel (string-capitalize (class-name (class-of obj))))))
(string-capitalize (kebab-camel (remove-as2-postfix (string (class-name (class-of obj))))))))
(defmacro define-property-method (class-name name)
`(defmethod ,name ((obj ,class-name) &optional value)