exts/protogen/protocol_generator/lib/protocol_generator/models/protocol_validator.rb
###################################
# Call this to validate a protocol
# @return [Boolean, Hash<String, Array<String>>] a list of encountered errors while validating the protocol
#    The returned Boolean indicates if the protocol was validated.
Call this to validate a protocol
Call this to validate a protocol
def validate(protocol)
      err = {}
      validated = true
      @@validators.each do |validator|
        errors = self.send(validator, protocol)
        if errors.size > 0
          err[validator] = errors
          validated = false
        end
      end
      [validated, err]
    end
def validate ( protocol ) err = { } validated = true @@validators . each do | validator | errors = self . send ( validator , protocol ) if errors . size > 0 err [ validator ] = errors validated = false end end [ validated , err ] end
Call this to validate a protocol
Call this to validate a protocol
a list of encountered errors while validating the protocol The returned Boolean indicates if the protocol was validated.
a list of encountered errors while validating the protocol The returned Boolean indicates if the protocol was validated .
Boolean, Hash<String, Array<String>>
protocol
<not_specific>