From 13b552538af9e9794398e4a4177ba1cea04cccca Mon Sep 17 00:00:00 2001 From: Seba Gamboa Date: Tue, 20 Oct 2015 12:48:31 -0300 Subject: Remove obvious warnings from docs --- mrbgems/mruby-enum-ext/mrblib/enum.rb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'mrbgems/mruby-enum-ext/mrblib/enum.rb') diff --git a/mrbgems/mruby-enum-ext/mrblib/enum.rb b/mrbgems/mruby-enum-ext/mrblib/enum.rb index 7efec89c9..b41eaaf1f 100644 --- a/mrbgems/mruby-enum-ext/mrblib/enum.rb +++ b/mrbgems/mruby-enum-ext/mrblib/enum.rb @@ -78,10 +78,10 @@ module Enumerable # Passes elements to the block until the block returns +nil+ or +false+, # then stops iterating and returns an array of all prior elements. # - # If no block is given, an enumerator is returned instead. + # If no block is given, an enumerator is returned instead. # - # a = [1, 2, 3, 4, 5, 0] - # a.take_while {|i| i < 3 } #=> [1, 2] + # a = [1, 2, 3, 4, 5, 0] + # a.take_while {|i| i < 3 } #=> [1, 2] # # @mrbgem mruby-enum-ext def take_while(&block) @@ -96,13 +96,12 @@ module Enumerable end ## - # call-seq: - # enum.each_cons(n) {...} -> nil - # # Iterates the given block for each array of consecutive # elements. # - # e.g.: + # @return [nil] + # + # @example # (1..10).each_cons(3) {|a| p a} # # outputs below # [1, 2, 3] @@ -130,12 +129,11 @@ module Enumerable end ## - # call-seq: - # enum.each_slice(n) {...} -> nil - # # Iterates the given block for each slice of elements. # - # e.g.: + # @return [nil] + # + # @example # (1..10).each_slice(3) {|a| p a} # # outputs below # [1, 2, 3] @@ -170,7 +168,7 @@ module Enumerable # block, and values are arrays of elements in enum # corresponding to the key. # - # (1..6).group_by {|i| i%3} #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]} + # (1..6).group_by {|i| i%3} #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]} # # @mrbgem mruby-enum-ext def group_by(&block) -- cgit v1.2.3