Class: SpreeCmCommissioner::Users::IncompleteGuestCheckerService
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::Users::IncompleteGuestCheckerService
- Defined in:
- app/services/spree_cm_commissioner/users/incomplete_guest_checker_service.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(user) ⇒ IncompleteGuestCheckerService
constructor
A new instance of IncompleteGuestCheckerService.
Constructor Details
#initialize(user) ⇒ IncompleteGuestCheckerService
6 7 8 |
# File 'app/services/spree_cm_commissioner/users/incomplete_guest_checker_service.rb', line 6 def initialize(user) @user = user end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'app/services/spree_cm_commissioner/users/incomplete_guest_checker_service.rb', line 4 def user @user end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'app/services/spree_cm_commissioner/users/incomplete_guest_checker_service.rb', line 10 def call return if user.blank? || incomplete_guest_info? user.['has_incomplete_guest_info'] = false user.save! end |