class Generator::PseudoPrime
- Generator::PseudoPrime
- Reference
- Object
Overview
An abstract class for enumerating pseudo-prime numbers.
Concrete subclasses should override succ, next, rewind.
Included Modules
- Enumerable(Int32)
Direct Known Subclasses
Defined in:
generators/pseudo_prime.crConstructors
Instance Method Summary
- #each
-
#each(&)
Must yield this collection's elements to the block.
- #next
- #rewind
-
#size
Returns the number of elements in the collection.
- #succ
- #upper_bound : Int32?
- #upper_bound=(ubound : Int32 | Nil)
-
#with_index(offset = 0)
see +Enumerator+#with_index.
-
#with_index(offset = 0, &)
see +Enumerator+#with_index.
-
#with_object(obj)
see +Enumerator+#with_object.
-
#with_object(obj, &)
see +Enumerator+#with_object.
Constructor Detail
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(Int32)
Must yield this collection's elements to the block.
def size
#
Description copied from module Enumerable(Int32)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4