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



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

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

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors



3
4
5
# File 'app/models/spree/return_item/eligibility_validator/base_validator.rb', line 3

def errors
  @errors
end

Instance Method Details

#eligible_for_return?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def eligible_for_return?
  raise NotImplementedError, Spree.t(:implement_eligible_for_return)
end

#requires_manual_intervention?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


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

def requires_manual_intervention?
  raise NotImplementedError, Spree.t(:implement_requires_manual_intervention)
end