Class: Enumerator::Generator
- Includes:
- Enumerable
- Defined in:
- ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb
Overview
just for internal
Constant Summary
Constants included from Enumerable
Instance Method Summary collapse
- #each(*args, &block) ⇒ Object
-
#initialize(&block) ⇒ Generator
constructor
A new instance of Generator.
Methods included from Enumerable
#all?, #any?, #chain, #collect, #count, #cycle, #detect, #drop, #drop_while, #each_cons, #each_slice, #each_with_index, #each_with_object, #entries, #filter_map, #find_all, #find_index, #first, #flat_map, #grep, #group_by, #hash, #include?, #inject, #lazy, #max, #max_by, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reject, #reverse_each, #sort, #sort_by, #take, #take_while, #tally, #to_h, #uniq, #zip
Constructor Details
#initialize(&block) ⇒ Generator
Returns a new instance of Generator.
530 531 532 533 534 |
# File 'ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb', line 530 def initialize(&block) raise TypeError, "wrong argument type #{self.class} (expected Proc)" unless block.kind_of? Proc @proc = block end |