Class: KXI::Collections::ProtectedCollection
- Inherits:
-
Enumerable
- Object
- Enumerable
- KXI::Collections::ProtectedCollection
- Defined in:
- lib/kxi/collections/protected_collection.rb
Overview
Represents a collection that can only be enumerated
Instance Method Summary collapse
-
#create_enumerator ⇒ KXI::Collections::Enumerator
Creates a new Enumerator bound to this instance.
-
#initialize(enum = []) ⇒ ProtectedCollection
constructor
Instantiates the ArrayCollection class.
Methods inherited from Enumerable
#aggregate, #all, #any, #can_alter?, #count, #enumerator, #first, #first!, #foreach, #last, #last!, #max, #min, #of_type, #of_type!, #order_by, #order_by_descending, #select, #select_many, #skip, #take, #to_array, #where
Constructor Details
#initialize(enum = []) ⇒ ProtectedCollection
Instantiates the ArrayCollection class
9 10 11 12 |
# File 'lib/kxi/collections/protected_collection.rb', line 9 def initialize(enum = []) super() @enum = enum end |
Instance Method Details
#create_enumerator ⇒ KXI::Collections::Enumerator
Creates a new Enumerator bound to this instance
16 17 18 |
# File 'lib/kxi/collections/protected_collection.rb', line 16 def create_enumerator @enum.create_enumerator end |