Class: SpreeCmCommissioner::ShowPersons::ContestantAssigner

Inherits:
Object
  • Object
show all
Includes:
Spree::ServiceModule::Base
Defined in:
app/services/spree_cm_commissioner/show_persons/contestant_assigner.rb

Instance Method Summary collapse

Instance Method Details

#call(show_person:, season:, show_contestant_ids: []) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'app/services/spree_cm_commissioner/show_persons/contestant_assigner.rb', line 20

def call(show_person:, season:, show_contestant_ids: [])
  @show_person = show_person
  @season = season
  @show_contestant_ids = show_contestant_ids || []

  assign_contestants

  success(show_person: @show_person)
rescue StandardError => e
  failure(nil, e.message)
end