Class: HugeCollection
- Inherits:
-
HugeEnumerable
- Object
- HugeEnumerable
- HugeCollection
- Defined in:
- lib/huge_enumerable/huge_collection.rb
Overview
collection # => “etneuebyurxgrvrfsreesxuvjaiyoqwplofsptacjdbhuhafdiwbwujvniokltgkjbfkiuy”
Direct Known Subclasses
Constant Summary
Constants inherited from HugeEnumerable
HugeEnumerable::DEFAULT_MAX_ARRAY_SIZE, HugeEnumerable::VERSION
Instance Attribute Summary
Attributes inherited from HugeEnumerable
Instance Method Summary collapse
-
#initialize(enumerable, max_array_size = nil, rng = nil) ⇒ HugeCollection
constructor
Create a new HugeCollection.
Methods inherited from HugeEnumerable
#[], #collection_each, #combination, #each, #empty?, #initialize_copy, #next_array, #permutation, #pop, #product, #sample, #shift, #shuffle, #shuffle!, #size
Constructor Details
#initialize(enumerable, max_array_size = nil, rng = nil) ⇒ HugeCollection
Create a new HugeCollection
Attributes
-
enumerable
- Any enumerable that responds to []
Options
-
:max_array_size
- The default size of arrays when #to_a is called. -
:rng
- The random number generator to use.
62 63 64 65 |
# File 'lib/huge_enumerable/huge_collection.rb', line 62 def initialize(enumerable, max_array_size = nil, rng = nil) @enum = enumerable super(max_array_size, rng) end |