Method: Bio::Sequence.adapter
- Defined in:
- lib/bio/sequence.rb
.adapter(source_data, adapter_module) ⇒ Object
Normally, users should not call this method directly. Use Bio::*#to_biosequence (e.g. Bio::GenBank#to_biosequence).
Creates a new Bio::Sequence object from database data with an adapter module.
463 464 465 466 467 468 469 470 471 |
# File 'lib/bio/sequence.rb', line 463 def self.adapter(source_data, adapter_module) biosequence = self.new(nil) biosequence.instance_eval { remove_instance_variable(:@seq) @source_data = source_data } biosequence.extend(adapter_module) biosequence end |