Class: SDM::RoleAttachment
- Inherits:
-
Object
- Object
- SDM::RoleAttachment
- Defined in:
- lib/models/porcelain.rb
Overview
A RoleAttachment assigns a role to a composite role.
Instance Attribute Summary collapse
-
#attached_role_id ⇒ Object
The id of the attached role of this RoleAttachment.
-
#composite_role_id ⇒ Object
The id of the composite role of this RoleAttachment.
-
#id ⇒ Object
Unique identifier of the RoleAttachment.
Instance Method Summary collapse
-
#initialize(attached_role_id: nil, composite_role_id: nil, id: nil) ⇒ RoleAttachment
constructor
A new instance of RoleAttachment.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(attached_role_id: nil, composite_role_id: nil, id: nil) ⇒ RoleAttachment
Returns a new instance of RoleAttachment.
6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 |
# File 'lib/models/porcelain.rb', line 6223 def initialize( attached_role_id: nil, composite_role_id: nil, id: nil ) if attached_role_id != nil @attached_role_id = attached_role_id end if composite_role_id != nil @composite_role_id = composite_role_id end if id != nil @id = id end end |
Instance Attribute Details
#attached_role_id ⇒ Object
The id of the attached role of this RoleAttachment.
6217 6218 6219 |
# File 'lib/models/porcelain.rb', line 6217 def attached_role_id @attached_role_id end |
#composite_role_id ⇒ Object
The id of the composite role of this RoleAttachment.
6219 6220 6221 |
# File 'lib/models/porcelain.rb', line 6219 def composite_role_id @composite_role_id end |
#id ⇒ Object
Unique identifier of the RoleAttachment.
6221 6222 6223 |
# File 'lib/models/porcelain.rb', line 6221 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
6239 6240 6241 6242 6243 6244 6245 |
# File 'lib/models/porcelain.rb', line 6239 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |