Class: Bio::Registry::DB
Instance Attribute Summary collapse
-
#database ⇒ Object
readonly
Returns the value of attribute database.
Instance Method Summary collapse
- #[]=(tag, value) ⇒ Object
-
#initialize(dbname) ⇒ DB
constructor
A new instance of DB.
- #method_missing(meth_id) ⇒ Object
Constructor Details
permalink #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
permalink #method_missing(meth_id) ⇒ Object
[View source]
250 251 252 |
# File 'lib/bio/io/registry.rb', line 250 def method_missing(meth_id) @property[meth_id.id2name] end |
Instance Attribute Details
Instance Method Details
permalink #[]=(tag, value) ⇒ Object
[View source]
254 255 256 |
# File 'lib/bio/io/registry.rb', line 254 def []=(tag, value) @property[tag] = value end |