Class: Fasta
Overview
Fasta record
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Fasta
constructor
A new instance of Fasta.
- #to_s ⇒ Object
Methods inherited from Record
Constructor Details
#initialize(args = {}) ⇒ Fasta
Returns a new instance of Fasta.
28 29 30 31 |
# File 'lib/dna/parsers/fasta.rb', line 28 def initialize(args={}) @name = args[:name] @sequence = args[:sequence] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
26 27 28 |
# File 'lib/dna/parsers/fasta.rb', line 26 def name @name end |
#sequence ⇒ Object
Returns the value of attribute sequence.
26 27 28 |
# File 'lib/dna/parsers/fasta.rb', line 26 def sequence @sequence end |
Instance Method Details
#to_s ⇒ Object
33 34 35 |
# File 'lib/dna/parsers/fasta.rb', line 33 def to_s ">#{@name}\n#{@sequence}" end |