lib/optional/option/enumerable.rb in optional-0.0.2 vs lib/optional/option/enumerable.rb in optional-0.0.3
- old
+ new
@@ -1,8 +1,13 @@
module Option
module Enumerable
include ::Enumerable
+ def do &block
+ each &block
+ self
+ end
+
def map
from_array super
end
alias_method :collect, :map
alias_method :flat_map, :map