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
77 78 79 80 81 82 83 84 85 |
# File 'lib/rgfa/field_validator.rb', line 77 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 |