class BoogieTools::BounceStudio

Attributes

license[RW]

Public Class Methods

new(license='') click to toggle source
# File lib/bounce_studio_ffi.rb, line 29
def initialize(license='')
  self.license=license
end

Public Instance Methods

check(raw_message, ignore_list='') click to toggle source

ignore list is pipe-delimited string of email addresses

# File lib/bounce_studio_ffi.rb, line 50
def check(raw_message, ignore_list='')
  code = nil
  string_output do |ptr|
    code = BounceStudioLib.bsBounceCheck(raw_message, ptr, ignore_list, self.license)
  end      
  return code          
end

Protected Instance Methods

string_output() { |ptr| ... } click to toggle source
# File lib/bounce_studio_ffi.rb, line 60
def string_output
  FFI::MemoryPointer.new(:pointer) do |ptr|
    yield(ptr)        
    strPtr = ptr.read_pointer
    return strPtr.null? ? nil : strPtr.read_string.force_encoding('UTF-8')
  end
end