Class: Iev::Db
- Inherits:
-
Object
- Object
- Iev::Db
- Defined in:
- lib/iev/db.rb
Overview
Cache class.
Instance Method Summary collapse
-
#fetch(code, lang) ⇒ String
Relaton XML serialisation of reference.
-
#initialize(global_cache, local_cache) ⇒ Db
constructor
A new instance of Db.
Constructor Details
#initialize(global_cache, local_cache) ⇒ Db
Returns a new instance of Db.
9 10 11 12 13 14 |
# File 'lib/iev/db.rb', line 9 def initialize(global_cache, local_cache) @db = open_cache_biblio(global_cache) @local_db = open_cache_biblio(local_cache, global: false) @db_name = global_cache @local_db_name = local_cache end |
Instance Method Details
#fetch(code, lang) ⇒ String
Returns Relaton XML serialisation of reference.
19 20 21 |
# File 'lib/iev/db.rb', line 19 def fetch(code, lang) check_bibliocache(code, lang) end |