Class: KXI::Collections::ProtectedCollection

Inherits:
Enumerable
  • Object
show all
Defined in:
lib/kxi/collections/protected_collection.rb

Overview

Represents a collection that can only be enumerated

Instance Method Summary collapse

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

Parameters:



9
10
11
12
# File 'lib/kxi/collections/protected_collection.rb', line 9

def initialize(enum = [])
	super()
	@enum = enum
end

Instance Method Details

#create_enumeratorKXI::Collections::Enumerator

Creates a new Enumerator bound to this instance

Returns:



16
17
18
# File 'lib/kxi/collections/protected_collection.rb', line 16

def create_enumerator
	@enum.create_enumerator
end