Sha256: 4e38d7671b0bff9d66f1a67dfe81e45fd9e65b921676fc6e274bf29c8bf6c3ef
Contents?: true
Size: 751 Bytes
Versions: 23
Compression:
Stored size: 751 Bytes
Contents
class InvocationContextIterator include Enumerable attr_accessor :_array_as_invocation_context private :_array_as_invocation_context def initialize(array_as_invocation_context) @_array_as_invocation_context = array_as_invocation_context @position = -1 @array_size = @_array_as_invocation_context.get_size.execute.get_value @array_as_list = Array.new(@array_size) @array_as_list.each_index do |i| @array_as_list[i] = _array_as_invocation_context.get_index(i) end end def each(&block) @array_as_list.each(&block) end def [](i) @_array_as_invocation_context.get_index(i) end def []=(i, value) @_array_as_invocation_context.set_index(i, value).execute end end
Version data entries
23 entries across 23 versions & 1 rubygems