lib/micro_micro/collections/items_collection.rb in micromicro-0.1.0 vs lib/micro_micro/collections/items_collection.rb in micromicro-1.0.0

- old
+ new

@@ -3,8 +3,13 @@ class ItemsCollection < BaseCollection # @return [Array<Hash{Symbol => Array<String, Hash>}>] def to_a map(&:to_h) end + + # @return [Array<String>] + def types + @types ||= map(&:types).flatten.uniq.sort + end end end end