Class: Fried::Typings::EnumeratorOf
- Inherits:
-
Object
- Object
- Fried::Typings::EnumeratorOf
- Defined in:
- lib/fried/typings/enumerator_of.rb
Overview
Checks if all enumerated objects Is of passed type
Instance Method Summary collapse
-
#initialize(type) ⇒ EnumeratorOf
constructor
A new instance of EnumeratorOf.
-
#valid?(enumerator) ⇒ Boolean
Notice that the method will actually iterate over the enumerator.
Methods included from Type
Methods included from MetaType
Constructor Details
#initialize(type) ⇒ EnumeratorOf
Returns a new instance of EnumeratorOf.
18 19 20 |
# File 'lib/fried/typings/enumerator_of.rb', line 18 def initialize(type) @type = type end |