Class: WorkOS::PatchGroupRoleAssignments
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::PatchGroupRoleAssignments
- Defined in:
- lib/workos/authorization/patch_group_role_assignments.rb
Constant Summary collapse
- HASH_ATTRS =
{ add: :add, remove: :remove }.freeze
Instance Attribute Summary collapse
-
#add ⇒ Object
Returns the value of attribute add.
-
#remove ⇒ Object
Returns the value of attribute remove.
Instance Method Summary collapse
-
#initialize(json) ⇒ PatchGroupRoleAssignments
constructor
A new instance of PatchGroupRoleAssignments.
Constructor Details
#initialize(json) ⇒ PatchGroupRoleAssignments
Returns a new instance of PatchGroupRoleAssignments.
16 17 18 19 20 |
# File 'lib/workos/authorization/patch_group_role_assignments.rb', line 16 def initialize(json) hash = self.class.normalize(json) @add = (hash[:add] || []).map { |item| item ? WorkOS::ReplaceGroupRoleAssignmentEntry.new(item) : nil } @remove = (hash[:remove] || []).map { |item| item ? WorkOS::ReplaceGroupRoleAssignmentEntry.new(item) : nil } end |
Instance Attribute Details
#add ⇒ Object
Returns the value of attribute add.
12 13 14 |
# File 'lib/workos/authorization/patch_group_role_assignments.rb', line 12 def add @add end |
#remove ⇒ Object
Returns the value of attribute remove.
12 13 14 |
# File 'lib/workos/authorization/patch_group_role_assignments.rb', line 12 def remove @remove end |