Module: Cure::Validators::Helpers

Included in:
Strategy::BaseStrategyParams
Defined in:
lib/cure/validators.rb

Instance Method Summary collapse

Instance Method Details

#valid?(suppress_error: false) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
65
66
67
68
# File 'lib/cure/validators.rb', line 62

def valid?(suppress_error: false)
  status = Validators.validate(self)
  return true if status
  return false if suppress_error

  raise "Object is invalid"
end