Class: Example::Signup::NotifyAdminService

Inherits:
Object
  • Object
show all
Includes:
Workflows::StepService
Defined in:
lib/example/signup/step_services/notify_admin.rb

Instance Method Summary collapse

Methods included from Workflows::StepService

#args, #get_output, #get_state, #set_args, #set_output, #set_state

Instance Method Details

#runObject



8
9
10
11
12
13
14
15
# File 'lib/example/signup/step_services/notify_admin.rb', line 8

def run
  if admin.notify_about(user)
    # no need to reset the state
    set_output "Admin is notified."
  else
    raise "Unable to notify admin about new user"
  end
end