class UdooNeoRest::ValidateDirection

Validate the Direction parameter

value : the direction value to be validated

Public Instance Methods

valid?() click to toggle source
# File lib/udooneorest/validators.rb, line 32
def valid?
  if (@value != DIRECTION_IN ) && (@value != DIRECTION_OUT)
    @error_message = UdooNeoRest::Base.status_error("Direction value of '#{@value}' is invalid. Should only be 'in' or 'out'.")
    return false
  end

  @error_message  = nil
  true
end