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

Version Path
javonet-ruby-sdk-2.5.7 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.6 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.5 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.4 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.3 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.2 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.1 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.5.0 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.11 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.8 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.7 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.6 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.5 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.4 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.3 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.4.2 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.3.0 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb
javonet-ruby-sdk-2.2.0 lib/javonet-ruby-sdk/sdk/internal/invocation_context_iterator.rb