Class: GFA::RecordSet::SegmentSet
- Inherits:
-
GFA::RecordSet
- Object
- GFA::RecordSet
- GFA::RecordSet::SegmentSet
- Defined in:
- lib/gfa/record_set/segment_set.rb
Constant Summary collapse
- CODE =
:S
- INDEX_FIELD =
Name: Segment name
2
Constants inherited from GFA::RecordSet
Instance Attribute Summary
Attributes inherited from GFA::RecordSet
Instance Method Summary collapse
-
#total_length ⇒ Object
Computes the sum of all individual segment lengths.
Methods inherited from GFA::RecordSet
#<<, #[], #code, code_class, #eql?, #find_index, #index!, #index_field, #index_id, #indexed?, #initialize, #merge!, name_class, #rebuild_index!, #save_index, #to_s, #type
Constructor Details
This class inherits a constructor from GFA::RecordSet
Instance Method Details
#total_length ⇒ Object
Computes the sum of all individual segment lengths
7 8 9 |
# File 'lib/gfa/record_set/segment_set.rb', line 7 def total_length set.map(&:length).reduce(0, :+) end |