Class: ScimPatchOperation
- Inherits:
-
Object
- Object
- ScimPatchOperation
- Defined in:
- app/libraries/scim_patch_operation.rb
Overview
Parse One of “Operations” in PATCH request
Direct Known Subclasses
Instance Attribute Summary collapse
-
#op ⇒ Object
readonly
Returns the value of attribute op.
-
#path_scim ⇒ Object
readonly
Returns the value of attribute path_scim.
-
#path_sp ⇒ Object
readonly
Returns the value of attribute path_sp.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(op, path, value) ⇒ ScimPatchOperation
constructor
path presence is guaranteed by ScimPatchOperationConverter.
Constructor Details
#initialize(op, path, value) ⇒ ScimPatchOperation
path presence is guaranteed by ScimPatchOperationConverter
value must be String or Array. complex-value(Hash) is converted to multiple single-value operations by ScimPatchOperationConverter
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/libraries/scim_patch_operation.rb', line 11 def initialize(op, path, value) if !op.in?(%w[add replace remove]) || path.nil? raise Scimaenaga::ExceptionHandler::UnsupportedPatchRequest end # define validate method in the inherited class validate(op, path, value) @op = op @value = value @path_scim = parse_path_scim(path) @path_sp = path_scim_to_path_sp(@path_scim) # define parse method in the inherited class end |
Instance Attribute Details
#op ⇒ Object (readonly)
Returns the value of attribute op.
5 6 7 |
# File 'app/libraries/scim_patch_operation.rb', line 5 def op @op end |
#path_scim ⇒ Object (readonly)
Returns the value of attribute path_scim.
5 6 7 |
# File 'app/libraries/scim_patch_operation.rb', line 5 def path_scim @path_scim end |
#path_sp ⇒ Object (readonly)
Returns the value of attribute path_sp.
5 6 7 |
# File 'app/libraries/scim_patch_operation.rb', line 5 def path_sp @path_sp end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'app/libraries/scim_patch_operation.rb', line 5 def value @value end |