Class: GFA::Field::String

Inherits:
GFA::Field show all
Defined in:
lib/gfa/field/string.rb

Constant Summary collapse

CODE =
:Z
REGEX =
/^[ !-~]+$/

Constants inherited from GFA::Field

CODES, TYPES

Instance Attribute Summary

Attributes inherited from GFA::Field

#value

Instance Method Summary collapse

Methods inherited from GFA::Field

#code, code_class, #hash, name_class, #regex, #to_s, #type

Constructor Details

#initialize(f) ⇒ String

Returns a new instance of String.



5
6
7
8
# File 'lib/gfa/field/string.rb', line 5

def initialize(f)
  GFA.assert_format(f, regex, "Bad #{type}")
  @value = f
end