Completely object oriented + functional = crazy weird calls on the return value of iterators. I fear it's utterly illegible though.
def has_category?(category)
not categories.select do |cat|
cat.cat_name == category
end.empty?
end
It would look totally normal in lisp though (pseudocode)
(define (has-category? category categories
(
Read more... )