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 100
    100:     def initialize(sequence, options = {})
    101:       @sequence = sequence
    102:       @options = options
    103:     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 80
    80:     def self.output(sequence, options = {})
    81:       self.new(sequence, options).output
    82:     end

### Public Instance methods

output()

generates output data

Returns: | String object

[Source]

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

[Validate]