Skip to content

Commit

Permalink
Add Member::hasMeta.
Browse files Browse the repository at this point in the history
  • Loading branch information
back2dos committed Nov 9, 2023
1 parent 0ca2e37 commit 8b769e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tink/macro/Member.hx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ abstract Member(Field) from Field to Field {
return
if (this.meta == null) [];
else [for (tag in this.meta) if (tag.name == name) tag];

public function hasMeta(name) {
for (m in this.meta)
if (m.name == name) return true;
return false;
}

public inline function asField():Field return this;
public function publish()
Expand Down

0 comments on commit 8b769e5

Please sign in to comment.