summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-enum-lazy
diff options
context:
space:
mode:
authorSeba Gamboa <[email protected]>2015-10-14 14:37:47 -0300
committerSeba Gamboa <[email protected]>2015-10-20 12:16:47 -0300
commit5cdcce8dbddd94ecb9503a0a1d47370c4ef97177 (patch)
tree07dae36bc4e2762a8d420fbea2e67b4a087ea260 /mrbgems/mruby-enum-lazy
parent84b70886cd9827593810264bf1f068044d5c6986 (diff)
downloadmruby-5cdcce8dbddd94ecb9503a0a1d47370c4ef97177.tar.gz
mruby-5cdcce8dbddd94ecb9503a0a1d47370c4ef97177.zip
Mark core gems with mrbgem tag
Diffstat (limited to 'mrbgems/mruby-enum-lazy')
-rw-r--r--mrbgems/mruby-enum-lazy/mrblib/lazy.rb47
1 files changed, 25 insertions, 22 deletions
diff --git a/mrbgems/mruby-enum-lazy/mrblib/lazy.rb b/mrbgems/mruby-enum-lazy/mrblib/lazy.rb
index 2ffeb1808..a31e89d0e 100644
--- a/mrbgems/mruby-enum-lazy/mrblib/lazy.rb
+++ b/mrbgems/mruby-enum-lazy/mrblib/lazy.rb
@@ -1,30 +1,33 @@
-# = Enumerable#lazy implementation
-#
-# Enumerable#lazy returns an instance of Enumerable::Lazy.
-# You can use it just like as normal Enumerable object,
-# except these methods act as 'lazy':
-#
-# - map collect
-# - select find_all
-# - reject
-# - grep
-# - drop
-# - drop_while
-# - take_while
-# - flat_map collect_concat
-# - zip
-#
-# == Acknowledgements
-#
-# Based on https://github.com/yhara/enumerable-lazy
-# Inspired by https://github.com/antimon2/enumerable_lz
-# http://jp.rubyist.net/magazine/?0034-Enumerable_lz (ja)
-
module Enumerable
+
+ # = Enumerable#lazy implementation
+ #
+ # Enumerable#lazy returns an instance of Enumerable::Lazy.
+ # You can use it just like as normal Enumerable object,
+ # except these methods act as 'lazy':
+ #
+ # - map collect
+ # - select find_all
+ # - reject
+ # - grep
+ # - drop
+ # - drop_while
+ # - take_while
+ # - flat_map collect_concat
+ # - zip
+ #
+ # @mrbgem mruby-enum-lazy
def lazy
Lazy.new(self)
end
+ # == Acknowledgements
+ #
+ # Based on https://github.com/yhara/enumerable-lazy
+ # Inspired by https://github.com/antimon2/enumerable_lz
+ # http://jp.rubyist.net/magazine/?0034-Enumerable_lz (ja)
+ #
+ # @mrbgem mruby-enum-lazy
class Lazy < Enumerator
def initialize(obj, &block)
super(){|yielder|