Class: UdooNeoRest::ValidateDirection
- Defined in:
- lib/udooneorest/validators.rb
Overview
Validate the Direction parameter
value : the direction value to be validated
Instance Attribute Summary
Attributes inherited from Validate
Instance Method Summary collapse
Methods inherited from Validate
Constructor Details
This class inherits a constructor from UdooNeoRest::Validate
Instance Method Details
#valid? ⇒ Boolean
32 33 34 35 36 37 38 39 40 |
# File 'lib/udooneorest/validators.rb', line 32 def valid? if (@value != DIRECTION_IN ) && (@value != DIRECTION_OUT) = UdooNeoRest::Base.status_error("Direction value of '#{@value}' is invalid. Should only be 'in' or 'out'.") return false end = nil true end |