Class: Hakuban::ObjectStateStream
- Includes:
- Stream
- Defined in:
- lib/hakuban/object_state_stream.rb
Instance Method Summary collapse
Methods included from Stream
#each, #for_each, #for_each_concurrent, #for_each_in_thread, #for_each_till_next
Methods inherited from FFIObject
#do_and_drop_or_return, #drop, #dropped?, from_ffi_pointer, generate_finalizer, #initialize, #initialize_copy, #inspect, #with_pointer, with_pointers
Constructor Details
This class inherits a constructor from Hakuban::FFIObject
Instance Method Details
#descriptor ⇒ Object
33 34 35 |
# File 'lib/hakuban/object_state_stream.rb', line 33 def descriptor Hakuban::FFIObject.from_ffi_pointer(Hakuban::ObjectDescriptor, with_pointer { |pointer| FFI::hakuban_object_state_stream_descriptor(pointer) }) end |
#initialize_from_ffi_pointer(pointer) ⇒ Object
14 15 16 |
# File 'lib/hakuban/object_state_stream.rb', line 14 def initialize_from_ffi_pointer(pointer) super(pointer, :hakuban_object_state_stream_drop, nil) end |
#next(&block) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/hakuban/object_state_stream.rb', line 24 def next(&block) process_item( lambda { |pointer| FFI::hakuban_object_state_stream_next(pointer) }, lambda { |pointer| FFIObject::from_ffi_pointer(ObjectState, pointer) }, &block ) end |