Class: Bio::Registry::DB

Inherits:
Object show all
Defined in:
lib/bio/io/registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dbname) ⇒ DB

Returns a new instance of DB.



244
245
246
247
# File 'lib/bio/io/registry.rb', line 244

def initialize(dbname)
  @database = dbname
  @property = Hash.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth_id) ⇒ Object



250
251
252
# File 'lib/bio/io/registry.rb', line 250

def method_missing(meth_id)
  @property[meth_id.id2name]
end

Instance Attribute Details

#databaseObject (readonly)

Returns the value of attribute database.



248
249
250
# File 'lib/bio/io/registry.rb', line 248

def database
  @database
end

Instance Method Details

#[]=(tag, value) ⇒ Object



254
255
256
# File 'lib/bio/io/registry.rb', line 254

def []=(tag, value)
  @property[tag] = value
end