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, line 110
def initialize(sequence, options = {})
  @sequence = sequence
  @options = options
end
output(sequence, options = {}) click to toggle source

Returns a formatterd string of the given sequence


Arguments:

Returns

String object

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

Public Instance Methods

output() click to toggle source

generates output data


Returns

String object

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