Class: Symbol
Instance Method Summary collapse
-
#validate_gfa_field!(datatype, fieldname = nil) ⇒ void
private
Validates the object according to the provided datatype.
Instance Method Details
#validate_gfa_field!(datatype, fieldname = nil) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Validates the object according to the provided datatype
91 92 93 94 95 96 97 98 99 |
# File 'lib/rgfa/field_validator.rb', line 91 def validate_gfa_field!(datatype, fieldname=nil) if datatype != :lbl and datatype != :orn and datatype != :Z raise RGFA::FieldParser::FormatError, "Wrong type (#{self.class}) for field #{fieldname}\n"+ "Content: #{self.inspect}\n"+ "Datatype: #{datatype}" end self.to_s.validate_gfa_field!(datatype) end |