Class: ScimPatchOperationUser

Inherits:
ScimPatchOperation show all
Defined in:
app/libraries/scim_patch_operation_user.rb

Instance Attribute Summary

Attributes inherited from ScimPatchOperation

#op, #path_scim, #path_sp, #value

Instance Method Summary collapse

Methods inherited from ScimPatchOperation

#initialize

Constructor Details

This class inherits a constructor from ScimPatchOperation

Instance Method Details

#save(model) ⇒ Object



5
6
7
8
9
10
11
12
# File 'app/libraries/scim_patch_operation_user.rb', line 5

def save(model)
  case @op
  when 'add', 'replace'
    model.attributes = { @path_sp => @value }
  when 'remove'
    model.attributes = { @path_sp => nil }
  end
end