No need for generic functions
This commit is contained in:
parent
720f847aff
commit
7ff2349ab5
2 changed files with 6 additions and 16 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
(defsystem "dev.metalisp.survey"
|
||||
:description "Create questionnaires and analyze the results."
|
||||
:version "0.5.41"
|
||||
:version "0.5.42"
|
||||
:author "Marcus Kammer <marcus.kammer@mailbox.org>"
|
||||
:source-control (:git "https://code.metalisp.dev/marcuskammer/dev.metalisp.survey.git")
|
||||
:licence "MIT"
|
||||
|
|
|
@ -31,34 +31,24 @@
|
|||
(uiop:merge-pathnames* uid-str
|
||||
(ml-survey/fileops:ensure-surveys-dir)))))))
|
||||
|
||||
(defgeneric survey-id-p (survey)
|
||||
(:documentation "Check if the survey ID is present in the surveys database."))
|
||||
|
||||
(defgeneric survey-data-dir-files (survey)
|
||||
(:documentation "Get the list of files in the survey's data directory."))
|
||||
|
||||
(defgeneric survey-data-dir-p (survey)
|
||||
(:documentation "Check if the survey's data directory exists."))
|
||||
|
||||
(defgeneric survey-properties-title (survey)
|
||||
(:documentation "Get title property."))
|
||||
|
||||
(defgeneric survey-properties-description (survey)
|
||||
(:documentation "Get description property."))
|
||||
|
||||
(defmethod survey-uid-p ((survey survey))
|
||||
"Check if the survey ID is present in the surveys database."
|
||||
(filter-surveys-by-uid (survey-uid survey)))
|
||||
|
||||
(defmethod survey-data-dir-files ((survey survey))
|
||||
"Get the list of files in the survey's data directory."
|
||||
(uiop:directory-files (survey-data-dir survey)))
|
||||
|
||||
(defmethod survey-data-dir-p ((survey survey))
|
||||
"Check if the survey's data directory exists."
|
||||
(uiop:directory-exists-p (survey-data-dir survey)))
|
||||
|
||||
(defmethod survey-properties-title ((survey survey))
|
||||
"Get title property."
|
||||
(cdr (assoc "title" (survey-properties survey) :test #'string-equal)))
|
||||
|
||||
(defmethod survey-properties-description ((survey survey))
|
||||
"Get description property."
|
||||
(cdr (assoc "description" (survey-properties survey) :test #'string-equal)))
|
||||
|
||||
(defmethod survey-questionnaires ((survey survey) &optional make-fn)
|
||||
|
|
Loading…
Add table
Reference in a new issue