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 110
    110:     def initialize(sequence, options = {})
    111:       @sequence = sequence
    112:       @options = options
    113:     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 90
    90:     def self.output(sequence, options = {})
    91:       self.new(sequence, options).output
    92:     end

### Public Instance methods

output()

generates output data

Returns: | String object

[Source]

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

[Validate]