Class: Spree::ReturnItem::EligibilityValidator::BaseValidator

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/return_item/eligibility_validator/base_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(return_item) ⇒ BaseValidator

Returns a new instance of BaseValidator



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

def initialize(return_item)
  @return_item = return_item
  @errors = {}
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors



7
8
9
# File 'app/models/spree/return_item/eligibility_validator/base_validator.rb', line 7

def errors
  @errors
end

Instance Method Details

#eligible_for_return?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


14
15
16
# File 'app/models/spree/return_item/eligibility_validator/base_validator.rb', line 14

def eligible_for_return?
  raise NotImplementedError, I18n.t('spree.implement_eligible_for_return')
end

#requires_manual_intervention?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


18
19
20
# File 'app/models/spree/return_item/eligibility_validator/base_validator.rb', line 18

def requires_manual_intervention?
  raise NotImplementedError, I18n.t('spree.implement_requires_manual_intervention')
end