Class: NWRFC::FunctionCall

Inherits:
DataContainer show all
Defined in:
lib/nwrfc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataContainer

#[], #[]=, #member_metadata, #value_to_date, #value_to_time

Constructor Details

#initialize(function) ⇒ FunctionCall

Returns a new instance of FunctionCall.



181
182
183
184
185
186
187
188
# File 'lib/nwrfc.rb', line 181

def initialize(function)
  @error = NWRFCLib::RFCError.new
  @function = function
  @connection = function.connection
  @handle = NWRFCLib.create_function(@function.desc, @error.to_ptr)
  @desc = function.desc
  NWRFC.check_error(@error)
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



179
180
181
# File 'lib/nwrfc.rb', line 179

def connection
  @connection
end

#descObject (readonly)

Returns the value of attribute desc.



179
180
181
# File 'lib/nwrfc.rb', line 179

def desc
  @desc
end

#functionObject (readonly)

Returns the value of attribute function.



179
180
181
# File 'lib/nwrfc.rb', line 179

def function
  @function
end

#handleObject (readonly)

Returns the value of attribute handle.



179
180
181
# File 'lib/nwrfc.rb', line 179

def handle
  @handle
end

Instance Method Details

#invokeObject



190
191
192
193
# File 'lib/nwrfc.rb', line 190

def invoke
  rc = NWRFCLib.invoke(@connection.handle, @handle, @error.to_ptr)
  NWRFC.check_error(@error) if rc > 0
end