class SDM::RoleGrant

A RoleGrant connects a resource to a role, granting members of the role access to that resource.

Attributes

id[RW]

Unique identifier of the RoleGrant.

resource_id[RW]

The id of the resource of this RoleGrant.

role_id[RW]

The id of the attached role of this RoleGrant.

Public Class Methods

new( id:nil \ , resource_id:nil \ , role_id:nil \ ) click to toggle source
# File lib/models/porcelain.rb, line 5636
                def initialize(
                        id:nil \
,
                        resource_id:nil \
,
                        role_id:nil \
                )
                        if id != nil
                                @id = id
                        end
                        if resource_id != nil
                                @resource_id = resource_id
                        end
                        if role_id != nil
                                @role_id = role_id
                        end
                end

Public Instance Methods

to_json(options={}) click to toggle source
# File lib/models/porcelain.rb, line 5653
def to_json(options={})
        hash = {}
        self.instance_variables.each do |var|
            hash[var.id2name.delete_prefix('@')] = self.instance_variable_get var
        end
        hash.to_json
end