Class: Jobshop::AuthenticationService
- Inherits:
-
Object
- Object
- Jobshop::AuthenticationService
- Defined in:
- app/services/jobshop/authentication_service.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(email, password) ⇒ AuthenticationService
constructor
A new instance of AuthenticationService.
- #perform ⇒ Object
Constructor Details
#initialize(email, password) ⇒ AuthenticationService
Returns a new instance of AuthenticationService.
5 6 7 8 |
# File 'app/services/jobshop/authentication_service.rb', line 5 def initialize(email, password) @email = email @password = password end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
3 4 5 |
# File 'app/services/jobshop/authentication_service.rb', line 3 def email @email end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
3 4 5 |
# File 'app/services/jobshop/authentication_service.rb', line 3 def password @password end |
Instance Method Details
#perform ⇒ Object
10 11 12 |
# File 'app/services/jobshop/authentication_service.rb', line 10 def perform Jobshop::JWTService.encode(user_id: user.id) if user end |