Module: RGFA::Headers
- Included in:
- RGFA
- Defined in:
- lib/rgfa/headers.rb
Overview
Methods for accessing the GFA header information.
The GFA header is accessed using RGFA#header, which returns a Line::Header object.
Multiple header lines defining the same tag
The specification does not explicitely forbid to have the same tag on different lines. To represent this case, a “field array” (RGFA::FieldArray) is used, which is an array of instances of a tag, from different lines of the header.
Instance Method Summary collapse
-
#delete_headers ⇒ RGFA
private
Remove all information from the header.
-
#header ⇒ RGFA::Line::Header
An header line representing the entire header information; if multiple header line were present, and they contain the same tag, the tag value is represented by a FieldArray.
-
#headers ⇒ Array<RGFA::Line::Header>
private
Header information in single-tag-lines.
Instance Method Details
#delete_headers ⇒ RGFA
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.
Remove all information from the header.
60 61 62 63 |
# File 'lib/rgfa/headers.rb', line 60 def delete_headers init_headers return self end |
#header ⇒ RGFA::Line::Header
Returns an header line representing the entire header information; if multiple header line were present, and they contain the same tag, the tag value is represented by a FieldArray.
39 40 41 |
# File 'lib/rgfa/headers.rb', line 39 def header @headers end |
#headers ⇒ Array<RGFA::Line::Header>
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.
Read-only! The returned array containes copies of the original values, i.e.\ changes in the lines will not affect the RGFA object; to update the values in the RGFA use the #header method.
Header information in single-tag-lines.
Returns an array of RGFA::Line::Header objects, each containing a single field of the header.
53 54 55 |
# File 'lib/rgfa/headers.rb', line 53 def headers @headers.split end |