Class: DashOverlord::UseCases::V1::Users::Show::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/dash_overlord/use_cases/v1/users/show/base.rb

Constant Summary

Constants inherited from Base

Base::AbortError

Instance Attribute Summary

Attributes inherited from Base

#context

Instance Method Summary collapse

Methods inherited from Base

context_reader, #initialize, perform, target, #target_valid?

Constructor Details

This class inherits a constructor from DashOverlord::UseCases::Base

Instance Method Details

#finalObject



13
14
15
16
# File 'lib/dash_overlord/use_cases/v1/users/show/base.rb', line 13

def final
  context.data = Serializers::V1::Users::Show.to_hash \
    context, status.ok? ? :user : false
end

#performObject



8
9
10
11
# File 'lib/dash_overlord/use_cases/v1/users/show/base.rb', line 8

def perform
  invoke! Admins::FindCurrentAdmin
  invoke! FindUser
end