Class: GFA::Field::Char

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

Constant Summary collapse

CODE =
:A
REGEX =
/[!-~]/
NATIVE_FUN =
:to_s

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, #eql?, #equivalent?, #hash, name_class, #native_fun, #regex, #to_native, #to_s, #type, #~

Constructor Details

#initialize(f) ⇒ Char

Returns a new instance of Char.



6
7
8
9
# File 'lib/gfa/field/char.rb', line 6

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