Class: UserVerificationSerializer
- Inherits:
-
Object
- Object
- UserVerificationSerializer
- Defined in:
- app/serializers/user_verification_serializer.rb
Instance Attribute Summary collapse
-
#user_verification ⇒ Object
readonly
Returns the value of attribute user_verification.
Instance Method Summary collapse
-
#initialize(user_verification:) ⇒ UserVerificationSerializer
constructor
A new instance of UserVerificationSerializer.
- #perform ⇒ Object
- #serialize_response ⇒ Object private
Constructor Details
#initialize(user_verification:) ⇒ UserVerificationSerializer
Returns a new instance of UserVerificationSerializer.
6 7 8 |
# File 'app/serializers/user_verification_serializer.rb', line 6 def initialize(user_verification:) @user_verification = user_verification end |
Instance Attribute Details
#user_verification ⇒ Object (readonly)
Returns the value of attribute user_verification.
4 5 6 |
# File 'app/serializers/user_verification_serializer.rb', line 4 def user_verification @user_verification end |
Instance Method Details
#perform ⇒ Object
10 11 12 |
# File 'app/serializers/user_verification_serializer.rb', line 10 def perform serialize_response end |
#serialize_response ⇒ Object (private)
16 17 18 19 20 21 22 |
# File 'app/serializers/user_verification_serializer.rb', line 16 def serialize_response { type: user_verification.credential_type, credential_id: user_verification.credential_identifier, locked: user_verification.locked } end |