Sha256: 116e7c54970f459896466e3e43420a37d443c801ec562ebfbf4221478944c452
Contents?: true
Size: 350 Bytes
Versions: 5
Compression:
Stored size: 350 Bytes
Contents
module DBF class FieldLengthError < DBFError; end class Field attr_reader :name, :type, :length, :decimal def initialize(name, type, length, decimal) raise FieldLengthError, "field length must be greater than 0" unless length > 0 @name, @type, @length, @decimal = name.gsub(/\0/, ''), type, length, decimal end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
dbf-0.5.2 | lib/dbf/field.rb |
dbf-0.4.7 | lib/dbf/field.rb |
dbf-0.5.0 | lib/dbf/field.rb |
dbf-0.5.1 | lib/dbf/field.rb |
dbf-0.5.3 | lib/dbf/field.rb |