Class | Bio::FlatFileIndex::Template::NameSpace
In: | lib/bio/io/flatfile/index.rb
Parent: | Object

templates of namespace

Internal use only.

### Methods

close filename include? mapping new search

### Attributes

dbname | [R] |
file | [R] |
name | [R] |

### Public Class methods

new(dbname, name)

[Source]

         # File lib/bio/io/flatfile/index.rb, line 457
    457:         def initialize(dbname, name)
    458:           @dbname = dbname
    459:           @name = name.dup
    460:           @name.freeze
    461:           @file = mapping(filename)
    462:         end

### Public Instance methods

close()

[Source]

         # File lib/bio/io/flatfile/index.rb, line 470
    470:         def close
    471:           @file.close
    472:         end

filename()

[Source]

         # File lib/bio/io/flatfile/index.rb, line 446
    446:         def filename
    447:           # should be redifined in child class
    448:           raise NotImplementedError, "should be redefined in child class"
    449:         end

include?(key)

[Source]

         # File lib/bio/io/flatfile/index.rb, line 474
    474:         def include?(key)
    475:           r = search(key)
    476:           unless r.empty? then
    477:             key
    478:           else
    479:             nil
    480:           end
    481:         end

mapping(filename)

[Source]

         # File lib/bio/io/flatfile/index.rb, line 451
    451:         def mapping(filename)
    452:           # should be redifined in child class
    453:           raise NotImplementedError, "should be redefined in child class"
    454:           #Flat_1::FlatMappingFile.new(filename)
    455:         end

search(key)

[Source]

         # File lib/bio/io/flatfile/index.rb, line 465
    465:         def search(key)
    466:           @file.open
    467:           @file.search(key)
    468:         end

[Validate]