Class: Stormpath::Rails::PasswordChange
- Inherits:
-
Object
- Object
- Stormpath::Rails::PasswordChange
- Defined in:
- app/services/stormpath/rails/password_change.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(sptoken, password) ⇒ PasswordChange
constructor
A new instance of PasswordChange.
Constructor Details
#initialize(sptoken, password) ⇒ PasswordChange
Returns a new instance of PasswordChange.
6 7 8 9 |
# File 'app/services/stormpath/rails/password_change.rb', line 6 def initialize(sptoken, password) @account = ForgotPasswordTokenVerification.new(sptoken).call @password = password end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
4 5 6 |
# File 'app/services/stormpath/rails/password_change.rb', line 4 def account @account end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
4 5 6 |
# File 'app/services/stormpath/rails/password_change.rb', line 4 def password @password end |
Instance Method Details
#call ⇒ Object
11 12 13 14 |
# File 'app/services/stormpath/rails/password_change.rb', line 11 def call account.password = password account.save end |