Repository URL to install this package:
|
Version:
1.3.3 ▾
|
require_relative 'rpc/authorization/authorization_twirp'
require_relative 'helpers/object_to_hash'
class Namara
def can(authorizations = [])
response = rpc_request(authorization_client) do |client|
client.can({ authorizations: authorizations }, rpc_headers)
end
ObjectToHash.to_hash_array(response.data.authorizations.to_a)
end
private
def authorization_client
@authorization_client ||= Authorization::AuthorizationServiceClient.new(api_url)
end
end