lib/data_mapper/support/enumerable.rb in datamapper-0.1.1 vs lib/data_mapper/support/enumerable.rb in datamapper-0.2.0
- old
+ new
@@ -1,6 +1,14 @@
module DataMapper
+ # The Support module adds functionality to Make Things Easier(tm):
+ # * grouping by attributes of objects in an array (returns a hash, see #DataMapper::Support::Enumerable)
+ # * adds symbols for operators like <= (lte), like, in, select, etc (see #DataMapper::Support::Symbol)
+ # * adds methods for strings, allowing us to ensure strings are wrapped with content (see #DataMapper::Support::String)
+ # * pulls in ActiveSupport's Inflector module
+ # * loads #DataMapper::Database and #DataMapper::Base
module Support
+
+ # Extends Array to include an instance method for grouping objects
module Enumerable
# Group a collection of elements into groups within a
# Hash. The value returned by the block passed to group_by
# is the key, and the value is an Array of items matching
\ No newline at end of file