Class: GFA::Record::Comment

Inherits:
GFA::Record show all
Defined in:
lib/gfa/record/comment.rb

Constant Summary collapse

CODE =
:'#'
REQ_FIELDS =
%i[comment]
OPT_FIELDS =
{}

Constants inherited from GFA::Record

CODES, TYPES

Instance Attribute Summary

Attributes inherited from GFA::Record

#fields

Instance Method Summary collapse

Methods inherited from GFA::Record

#[], [], #code, code_class, #dup, #empty?, #eql?, #hash, name_class, #to_s, #type

Constructor Details

#initialize(comment, *opt_fields) ⇒ Comment

Returns a new instance of Comment.



10
11
12
13
14
# File 'lib/gfa/record/comment.rb', line 10

def initialize(comment, *opt_fields)
  @fields = {}
  add_field(2, :Z, comment, /.*/)
  opt_fields.each { |f| add_opt_field(f, OPT_FIELDS) }
end