Sha256: 37783949777600873016eddc647dbf91f299d74339b2a581fab4197354d423fc

Contents?: true

Size: 293 Bytes

Versions: 13

Compression:

Stored size: 293 Bytes

Contents

require 'conjur/role'

module Conjur
  class API
    def create_role(role, options = {})
      role(role).tap do |r|
        r.create(options)
      end
    end

    def role role
      Role.new(Conjur::Authz::API.host, credentials)[self.class.parse_role_id(role).join('/')]
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
conjur-api-2.3.1 lib/conjur/api/roles.rb
conjur-api-2.2.3 lib/conjur/api/roles.rb
conjur-api-2.2.2 lib/conjur/api/roles.rb
conjur-api-2.2.1 lib/conjur/api/roles.rb
conjur-api-2.1.8 lib/conjur/api/roles.rb
conjur-api-2.1.7 lib/conjur/api/roles.rb
conjur-api-2.1.6 lib/conjur/api/roles.rb
conjur-api-2.1.5 lib/conjur/api/roles.rb
conjur-api-2.1.4 lib/conjur/api/roles.rb
conjur-api-2.1.3 lib/conjur/api/roles.rb
conjur-api-2.1.2 lib/conjur/api/roles.rb
conjur-api-2.1.1 lib/conjur/api/roles.rb
conjur-api-2.1.0 lib/conjur/api/roles.rb