Open postmodern opened 9 years ago
It's an enumerable that yields attribute instances so default behavior is that you end up with an array. If there's a simple way of making it return an attribute set instance then I'm all for it.
You would have to override #select
to wrap the result in a new AttributeSet
. While it would be nice to retain the methods in AttributeSet
, #select
traditionally returns an Array
(even for Hash
and Set
).
@postmodern At least as of Ruby 1.9.3, Hash#select
returns a Hash
. I know that this was not the case in Ruby 1.8.7 where it did return an Array
.
Shouldn't
AttributeSet#select
return a sub-attribute-set?