Class: ReturnItem::EligibilityValidator::Default

Inherits:
Spree::ReturnItem::EligibilityValidator::BaseValidator
  • Object
show all
Defined in:
app/models/spree/return_item/eligibility_validator/default.rb

Instance Method Summary collapse

Instance Method Details

#eligible_for_return?Boolean


9
10
11
# File 'app/models/spree/return_item/eligibility_validator/default.rb', line 9

def eligible_for_return?
  validators.all? {|v| v.eligible_for_return? }
end

#errorsObject


17
18
19
# File 'app/models/spree/return_item/eligibility_validator/default.rb', line 17

def errors
  validators.map(&:errors).reduce({}, :merge)
end

#requires_manual_intervention?Boolean


13
14
15
# File 'app/models/spree/return_item/eligibility_validator/default.rb', line 13

def requires_manual_intervention?
  validators.any? {|v| v.requires_manual_intervention? }
end