Class: Orderspace::Structs::CustomerValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/orderspace/struct/customer.rb

Class Method Summary collapse

Class Method Details

.validate(customer) ⇒ Object



13
14
15
16
17
# File 'lib/orderspace/struct/customer.rb', line 13

def self.validate(customer)
  return unless customer.company_name.nil?

  raise ValidationFailedError, 'Validation failed: Company name cannot be blank'
end