Jeremy Evans wrote:
> On Apr 9, 4:31 pm, Joel VanderWerf <[email protected]> wrote:
>> Sequel result sets don't seem to implement #none?, though they do have
>> #any? Easy to improvise, but #none? is nice for readability...
>
> any? is just an Enumerable method, so if you want none?:
>
> module Enumerable
> def none?(&block)
> !any?(&block)
> end
> end
>
> If you do this, anything that includes Enumerable can use none?. I
> don't think Sequel should add this method, as Sequel doesn't modify
> the core classes/modules other than to support its DSL. However, the
> beauty of ruby is you can add the method easily yourself.
My mistake -- I saw Enumerable#none? in ri, but it was provided by facets.
I prefer having this in Enumerable itself, as you described above
(either by adding it to core or just requiring facets).
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---