Sha256: 57b4e070e3185decb31bd0759c8fa34bed48b46dfebc584c813d24dab638f1ab

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

require_relative "confium/version"

module Confium
  # class Error < StandardError; end

  # def self.context
  #   cfm = Confium::CFM.new
  #   cfm.load_plugin('botan', ENV['CFM_HASH_BOTAN_PLUGIN_PATH'])
  #   cfm
  # end

  def self.call_ffi_rc(fn, *args)
    rc = Confium::Lib.method(fn).call(*args)
    raise "FFI call to #{fn} failed (rc: #{rc})" unless rc.zero?
    rc
  end

  def self.call_ffi(fn, *args)
    call_ffi_rc(fn, *args)
    nil
  end

end

require_relative 'confium/lib'
require_relative 'confium/cfm'
require_relative 'confium/digest'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
confium-0.2.0 lib/confium.rb
confium-0.1.0 lib/confium.rb