summaryrefslogtreecommitdiffstats
path: root/src/verb/verb.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/verb/verb.rs')
-rw-r--r--src/verb/verb.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/verb/verb.rs b/src/verb/verb.rs
index c800b06..336de58 100644
--- a/src/verb/verb.rs
+++ b/src/verb/verb.rs
@@ -169,6 +169,10 @@ impl Verb {
self
}
+ pub fn has_name(&self, searched_name: &str) -> bool {
+ self.names.iter().any(|name| name == searched_name)
+ }
+
/// Assuming the verb has been matched, check whether the arguments
/// are OK according to the regex. Return none when there's no problem
/// and return the error to display if arguments don't match.