class Bio::FlatFileIndex::Template::NameSpace
templates of namespace
Internal use only.
Attributes
dbname[R]
file[R]
name[R]
Public Class Methods
new(dbname, name)
click to toggle source
# File lib/bio/io/flatfile/index.rb, line 457 def initialize(dbname, name) @dbname = dbname @name = name.dup @name.freeze @file = mapping(filename) end
Public Instance Methods
close()
click to toggle source
# File lib/bio/io/flatfile/index.rb, line 470 def close @file.close end
filename()
click to toggle source
# File lib/bio/io/flatfile/index.rb, line 446 def filename # should be redifined in child class raise NotImplementedError, "should be redefined in child class" end
include?(key)
click to toggle source
# File lib/bio/io/flatfile/index.rb, line 474 def include?(key) r = search(key) unless r.empty? then key else nil end end
mapping(filename)
click to toggle source
# File lib/bio/io/flatfile/index.rb, line 451 def mapping(filename) # should be redifined in child class raise NotImplementedError, "should be redefined in child class" #Flat_1::FlatMappingFile.new(filename) end
search(key)
click to toggle source
# File lib/bio/io/flatfile/index.rb, line 465 def search(key) @file.open @file.search(key) end