class Bio::FlatFileIndex::Flat_1::Record
Record
class.
Internal use only.
Attributes
key[R]
size[R]
val[R]
Public Class Methods
create(size, key, val)
click to toggle source
# File lib/bio/io/flatfile/index.rb 714 def self.create(size, key, val) 715 self.new(self.to_string(size, key, val)) 716 end
new(str, size = nil)
click to toggle source
# File lib/bio/io/flatfile/index.rb 696 def initialize(str, size = nil) 697 a = str.split("\t") 698 a.each { |x| x.to_s.gsub!(/[\000 ]+\z/, '') } 699 @key = a.shift.to_s 700 @val = a 701 @size = (size or str.length) 702 #DEBUG.print "key=#{@key.inspect},val=#{@val.inspect},size=#{@size}\n" 703 end
to_string(size, key, val)
click to toggle source
# File lib/bio/io/flatfile/index.rb 710 def self.to_string(size, key, val) 711 sprintf("%-*s", size, key + "\t" + val.join("\t")) 712 end
Public Instance Methods
==(x)
click to toggle source
# File lib/bio/io/flatfile/index.rb 718 def ==(x) 719 self.to_s == x.to_s 720 end
to_s()
click to toggle source
# File lib/bio/io/flatfile/index.rb 706 def to_s 707 self.class.to_string(@size, @key, @val) 708 end