lib/ect.rb in ect-0.0.1 vs lib/ect.rb in ect-1.0.0
- old
+ new
@@ -1,11 +1,28 @@
module Ect
- VERSION = '0.0.1'
+ VERSION = '1.0.0'
end
+
+class Object
+
+ alias inflect tap
+
+ def deflect
+
+ yield(self)
+ end
+end
+
+
module Enumerable
alias bisect partition
+
+ def dissect
+
+ inject([]) { |a, elt| (a[yield(elt)] ||= []) << elt; a }
+ end
end