Class | Bio::Sequence::Format::FormatterBase
In: | lib/bio/sequence/format.rb
Parent: | Object

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

### Methods

new output output

### Public Class methods

new(sequence, options = {})

creates a new formatter object for output

[Source]

         # File lib/bio/sequence/format.rb, line 116
    116:     def initialize(sequence, options = {})
    117:       @sequence = sequence
    118:       @options = options
    119:     end

output(sequence, options = {})

Returns a formatterd string of the given sequence

Arguments:

- (required) sequence: Bio::Sequence object
- (optional) options: a Hash object

Returns: | String object

[Source]

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

### Public Instance methods

output()

generates output data

Returns: | String object

[Source]

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

[Validate]