Class: Renalware::System::UpdateUser

Inherits:
Object
  • Object
show all
Defined in:
app/models/renalware/system/update_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_methodObject (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

#notificationsObject (readonly)

Returns the value of attribute notifications.



8
9
10
# File 'app/models/renalware/system/update_user.rb', line 8

def notifications
  @notifications
end

#notifierObject (readonly)

Returns the value of attribute notifier.



8
9
10
# File 'app/models/renalware/system/update_user.rb', line 8

def notifier
  @notifier
end

#userObject (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