Class: Float
- Defined in:
- lib/rgfa/field_writer.rb,
lib/rgfa/field_validator.rb
Instance Method Summary collapse
-
#default_gfa_datatype ⇒ RGFA::Line::FIELD_DATATYPE
private
Optional field GFA datatype to use, if none is provided.
-
#validate_gfa_field!(datatype, fieldname = nil) ⇒ void
private
Validates the object according to the provided datatype.
Instance Method Details
#default_gfa_datatype ⇒ RGFA::Line::FIELD_DATATYPE
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.
Optional field GFA datatype to use, if none is provided
57 |
# File 'lib/rgfa/field_writer.rb', line 57 def default_gfa_datatype; :f; end |
#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
218 219 220 221 222 223 224 225 |
# File 'lib/rgfa/field_validator.rb', line 218 def validate_gfa_field!(datatype, fieldname=nil) if datatype != :f and datatype != :Z raise RGFA::FieldParser::FormatError, "Wrong type (#{self.class}) for field #{fieldname}\n"+ "Content: #{self.inspect}\n"+ "Datatype: #{datatype}" end end |