Class: Renalware::System::UpdateUser
- Inherits:
-
Object
- Object
- Renalware::System::UpdateUser
- Defined in:
- app/models/renalware/system/update_user.rb
Instance Attribute Summary collapse
-
#delivery_method ⇒ Object
readonly
Returns the value of attribute delivery_method.
-
#notifications ⇒ Object
readonly
Returns the value of attribute notifications.
-
#notifier ⇒ Object
readonly
Returns the value of attribute notifier.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #call(params) ⇒ Object
-
#initialize(user) ⇒ UpdateUser
constructor
A new instance of UpdateUser.
Constructor Details
#initialize(user) ⇒ UpdateUser
Returns a new instance of UpdateUser.
10 11 12 13 14 15 |
# File 'app/models/renalware/system/update_user.rb', line 10 def initialize(user) @user = user @notifier = Admin::UserMailer @notifications = [] @delivery_method = :deliver_later end |
Instance Attribute Details
#delivery_method ⇒ Object (readonly)
Returns the value of attribute delivery_method.
8 9 10 |
# File 'app/models/renalware/system/update_user.rb', line 8 def delivery_method @delivery_method end |
#notifications ⇒ Object (readonly)
Returns the value of attribute notifications.
8 9 10 |
# File 'app/models/renalware/system/update_user.rb', line 8 def notifications @notifications end |
#notifier ⇒ Object (readonly)
Returns the value of attribute notifier.
8 9 10 |
# File 'app/models/renalware/system/update_user.rb', line 8 def notifier @notifier end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
8 9 10 |
# File 'app/models/renalware/system/update_user.rb', line 8 def user @user end |
Instance Method Details
#call(params) ⇒ Object
17 18 19 |
# File 'app/models/renalware/system/update_user.rb', line 17 def call(params) update!(params) && notify! end |