Class: Ms::Mascot::Mgf::Archive

Inherits:
ExternalArchive
  • Object
show all
Defined in:
lib/ms/mascot/mgf/archive.rb

Overview

Provides array-like access to an mgf archival file.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.write(filename) ⇒ Object

yields an object for writing



12
13
14
15
16
# File 'lib/ms/mascot/mgf/archive.rb', line 12

def self.write(filename)
  mgf = self.new
  File.open(filename, 'w') do |out|
  end
end

Instance Method Details

#reindex(&block) ⇒ Object

Reindexes self to each mgf entry in io



19
20
21
# File 'lib/ms/mascot/mgf/archive.rb', line 19

def reindex(&block)
  reindex_by_sep("BEGIN IONS", :entry_follows_sep => true, &block)
end

#str_to_entry(str) ⇒ Object

Returns an Mgf::Entry initialized using str



24
25
26
# File 'lib/ms/mascot/mgf/archive.rb', line 24

def str_to_entry(str)
  Entry.parse(str)
end