Class: Sigma::DataInput
- Inherits:
-
Object
- Object
- Sigma::DataInput
- Extended by:
- FFI::Library
- Defined in:
- lib/sigma/data_input.rb
Overview
Inputs, that are used to enrich script context, but won’t be spent by the transaction
Instance Attribute Summary collapse
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Class Method Summary collapse
-
.with_box_id(box_id) ⇒ DataInput
Parse BoxId and create DataInput.
-
.with_raw_pointer(pointer) ⇒ DataInput
Takes ownership of an existing DataInput Pointer.
Instance Method Summary collapse
-
#get_box_id ⇒ BoxId
Get BoxId.
Instance Attribute Details
#pointer ⇒ Object
Returns the value of attribute pointer.
14 15 16 |
# File 'lib/sigma/data_input.rb', line 14 def pointer @pointer end |
Class Method Details
.with_box_id(box_id) ⇒ DataInput
Parse BoxId and create DataInput
19 20 21 22 23 |
# File 'lib/sigma/data_input.rb', line 19 def self.with_box_id(box_id) pointer = FFI::MemoryPointer.new(:pointer) ergo_lib_data_input_new(box_id.pointer, pointer) init(pointer) end |
.with_raw_pointer(pointer) ⇒ DataInput
Note:
A user of sigma_rb generally does not need to call this function
Takes ownership of an existing DataInput Pointer.
29 30 31 |
# File 'lib/sigma/data_input.rb', line 29 def self.with_raw_pointer(pointer) init(pointer) end |
Instance Method Details
#get_box_id ⇒ BoxId
Get BoxId
35 36 37 38 39 |
# File 'lib/sigma/data_input.rb', line 35 def get_box_id pointer = FFI::MemoryPointer.new(:pointer) ergo_lib_data_input_new(self.pointer, pointer) Sigma::BoxId.with_raw_pointer(pointer) end |