Module: Capnp::List

Extended by:
T::Generic, T::Helpers, T::Sig
Includes:
Enumerable, Kernel
Included in:
BufferList, ObjectList, String
Defined in:
lib/capnp/runtime/list/list.rb

Constant Summary collapse

Elem =
type_member(:out)

Instance Method Summary collapse

Instance Method Details

#[](ix) ⇒ Object



27
28
29
30
# File 'lib/capnp/runtime/list/list.rb', line 27

def [](ix)
  return if ix < 0 || ix >= length
  get(ix)
end

#each(&blk) ⇒ Object



33
34
35
36
37
# File 'lib/capnp/runtime/list/list.rb', line 33

def each(&blk)
  length.times do |ix|
    blk.call(get(ix))
  end
end

#lengthObject



17
18
# File 'lib/capnp/runtime/list/list.rb', line 17

def length
end

#to_objObject



40
41
# File 'lib/capnp/runtime/list/list.rb', line 40

def to_obj
end