Class: Foobara::Auth::FindUser
- Defined in:
- foobara-auth-0.1.1/src/find_user.rb
Defined Under Namespace
Classes: UserNotFoundError
Constant Summary
Constants included from TruncatedInspect
Instance Attribute Summary collapse
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Methods inherited from Command
Methods included from TruncatedInspect
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Instance Attribute Details
#user ⇒ Object
Returns the value of attribute user.
30 31 32 |
# File 'src/find_user.rb', line 30 def user @user end |
Instance Method Details
#execute ⇒ Object
24 25 26 27 28 |
# File 'src/find_user.rb', line 24 def execute load_user user end |
#load_user ⇒ Object
32 33 34 35 36 37 38 |
# File 'src/find_user.rb', line 32 def load_user self.user = Types::User.find_by(inputs) unless user add_runtime_error(UserNotFoundError.new(context: inputs)) end end |