Browse Source

Add a full-name method

elexandria
Damien Cassou 3 years ago
parent
commit
cdaab6a60f
No known key found for this signature in database GPG Key ID: A7123815F5DCE914
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      libelcouch.el

+ 9
- 0
libelcouch.el View File

@ -85,6 +85,15 @@ considered to have failed."
"Return the name of ENTITY."
(libelcouch--named-entity-name entity))
(cl-defgeneric libelcouch-entity-full-name ((entity libelcouch-named-entity))
"Return the full name of ENTITY's parent followed by ENTITY name."
(format "%s/%s"
(libelcouch-entity-name (libelcouch-entity-parent entity))
(libelcouch-entity-name entity)))
(cl-defmethod libelcouch-entity-full-name ((entity libelcouch-instance))
(libelcouch-entity-name entity))
(cl-defgeneric libelcouch-entity-parent (entity)
"Return the entity containing ENTITY.")


Loading…
Cancel
Save