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

Public Instance Methods

output() click to toggle source

generates output data


Returns

String object

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