From 6bc735051d38c1f84acaa40d8e724398e50dcc90 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 16 Mar 2020 15:33:39 +0000 Subject: indices can now return confidence levels also, tests pass again --- lib/MaildirIndexer/Index.rakumod | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/MaildirIndexer/Index.rakumod') diff --git a/lib/MaildirIndexer/Index.rakumod b/lib/MaildirIndexer/Index.rakumod index 8d7ad30..90bc6bd 100644 --- a/lib/MaildirIndexer/Index.rakumod +++ b/lib/MaildirIndexer/Index.rakumod @@ -15,6 +15,11 @@ my class MailboxForEmail is export { has Channel:D $.reply-to is required; } +my class Mailbox is export { + has Str:D $.name is required; + has Numeric:D $.confidence is required; +} + method receive(Channel:D $channel --> Nil) { react { whenever $channel -> $event { @@ -33,4 +38,4 @@ method receive(Channel:D $channel --> Nil) { method add-mail(MaildirIndexer::Email:D $email, Str:D $mailbox --> Nil) { ... } method del-path(IO:D $path, Str:D $mailbox --> Nil) { ... } -method mailbox-for-email(MaildirIndexer::Email:D $email --> Str) { ... } +method mailbox-for-email(MaildirIndexer::Email:D $email --> Mailbox) { ... } -- cgit v1.2.3