Sha256: a69d9179d8a4b4278e55f164aa54b9b21058da61cac57d91b1ed40e8d7611738

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

require_relative "../aleph_adapter"

module Skala::AlephAdapter::ResolveUser
  # @depends_on instance methode #adapter
  def resolve_user(username, options = {})
    username = username.upcase
    user_library = options[:user_library] || adapter.default_user_library

    x_services_result = adapter.x_services.post(
      op: "bor-by-key",
      bor_id: username,
      library: user_library
    )

    x_services_result.match(/<internal-id>(.*)<\/internal-id>/) do |_match_data|
      _match_data.captures.first
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skala-1.1.0 lib/skala/aleph_adapter/resolve_user.rb