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(id: nil, composite_role_id: nil, attached_role_id: nil) ⇒ RoleAttachment
constructor
A new instance of RoleAttachment.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(id: nil, composite_role_id: nil, attached_role_id: nil) ⇒ RoleAttachment
Returns a new instance of RoleAttachment.
4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 |
# File 'lib/models/porcelain.rb', line 4646 def initialize( id:nil \ , composite_role_id:nil \ , attached_role_id:nil \ ) if id != nil @id = id end if composite_role_id != nil @composite_role_id = composite_role_id end if attached_role_id != nil @attached_role_id = attached_role_id end end |
Instance Attribute Details
#attached_role_id ⇒ Object
The id of the attached role of this RoleAttachment.
4645 4646 4647 |
# File 'lib/models/porcelain.rb', line 4645 def attached_role_id @attached_role_id end |
#composite_role_id ⇒ Object
The id of the composite role of this RoleAttachment.
4643 4644 4645 |
# File 'lib/models/porcelain.rb', line 4643 def composite_role_id @composite_role_id end |
#id ⇒ Object
Unique identifier of the RoleAttachment.
4641 4642 4643 |
# File 'lib/models/porcelain.rb', line 4641 def id @id end |
Instance Method Details
#to_json(options = {}) ⇒ Object
4663 4664 4665 4666 4667 4668 4669 |
# File 'lib/models/porcelain.rb', line 4663 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 |