Class: Truffle::Interop::ForeignEnumerable
- Inherits:
-
Object
- Object
- Truffle::Interop::ForeignEnumerable
- Includes:
- Enumerable
- Defined in:
- truffle/src/main/ruby/core/truffle/interop.rb
Instance Attribute Summary (collapse)
-
- (Object) foreign
readonly
Returns the value of attribute foreign.
Instance Method Summary (collapse)
- - (Object) each
-
- (ForeignEnumerable) initialize(foreign)
constructor
A new instance of ForeignEnumerable.
- - (Object) size
Constructor Details
- (ForeignEnumerable) initialize(foreign)
Returns a new instance of ForeignEnumerable
32 33 34 |
# File 'truffle/src/main/ruby/core/truffle/interop.rb', line 32 def initialize(foreign) @foreign = foreign end |
Instance Attribute Details
- (Object) foreign (readonly)
Returns the value of attribute foreign
30 31 32 |
# File 'truffle/src/main/ruby/core/truffle/interop.rb', line 30 def foreign @foreign end |
Instance Method Details
- (Object) each
36 37 38 39 40 |
# File 'truffle/src/main/ruby/core/truffle/interop.rb', line 36 def each (0...size).each do |n| yield foreign[n] end end |
- (Object) size
42 43 44 |
# File 'truffle/src/main/ruby/core/truffle/interop.rb', line 42 def size Truffle::Interop.size(foreign) end |