class Bio::Sequence::Format::FormatterBase

Formatter base class. Any formatter class should inherit this class.

Public Class Methods

new(sequence, options = {}) click to toggle source

creates a new formatter object for output

    # File lib/bio/sequence/format.rb
110 def initialize(sequence, options = {})
111   @sequence = sequence
112   @options = options
113 end
output(sequence, options = {}) click to toggle source

Returns a formatterd string of the given sequence


Arguments:

  • (required) sequence: Bio::Sequence object

  • (optional) options: a Hash object

Returns

String object

   # File lib/bio/sequence/format.rb
90 def self.output(sequence, options = {})
91   self.new(sequence, options).output
92 end

Public Instance Methods

output() click to toggle source

generates output data


Returns

String object

    # File lib/bio/sequence/format.rb
105 def output
106   raise NotImplementedError, 'should be implemented in subclass'
107 end