Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/mityc-geoportal/ext/array.rb
Instance Method Summary collapse
Instance Method Details
#by_attribute(attr_name) ⇒ Object
2 3 4 5 |
# File 'lib/mityc-geoportal/ext/array.rb', line 2 def by_attribute(attr_name) group_by_attribute(attr_name) groups_by_attribute.each { |attr_value, items| yield attr_value, items } end |