Class: GoApi::Example
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- GoApi::Example
- Defined in:
- lib/meshx-plugin-sdk.rb
Instance Method Summary collapse
-
#greet ⇒ Object
This feels convoluted, but it hides the fact that our function is loaded outside of the “struct mirror” class.
-
#initialize(prefix, id) ⇒ Example
constructor
A new instance of Example.
Constructor Details
#initialize(prefix, id) ⇒ Example
Returns a new instance of Example.
18 19 20 21 |
# File 'lib/meshx-plugin-sdk.rb', line 18 def initialize(prefix, id) self[:prefix] = FFI::MemoryPointer.from_string(prefix) self[:id] = id end |
Instance Method Details
#greet ⇒ Object
This feels convoluted, but it hides the fact that our function is loaded outside of the “struct mirror” class.
25 26 27 |
# File 'lib/meshx-plugin-sdk.rb', line 25 def greet Portal.greet(self) end |