Re: [PATCH 0/3] ruby: get rid of FileNames object

Subject: Re: [PATCH 0/3] ruby: get rid of FileNames object

Date: Tue, 28 Mar 2023 00:51:50 -0600

To: David Bremner

Cc: notmuch@notmuchmail.org

From: Felipe Contreras


On Tue, Mar 28, 2023 at 12:47 AM Felipe Contreras
<felipe.contreras@gmail.com> wrote:

> We can replace the Foo object any other kind of Enumerable, and the
> code works just the same:
>
>   foo = %w[inbox unread]

I realized this might be too idiomatic of Ruby, it's the same thing as:

foo = [ 'inbox', 'unread' ]

>   foo.each { |e| puts e }
>   puts 'first: %s' % foo.first
>   puts 'count: %s' % foo.count

-- 
Felipe Contreras
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: