Module: ThemisCommon

Class Method Summary collapse

Class Method Details

.empty?(value) ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/rbthemis.rb', line 25

def empty?(value)
  return value.nil? || value.empty?
end

.string_to_pointer_size(string) ⇒ Object



20
21
22
23
# File 'lib/rbthemis.rb', line 20

def string_to_pointer_size(string)
  string_buf = FFI::MemoryPointer.from_string(string)
  [string_buf, string.bytesize]
end