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.
11 12 13 14 15 16 |
# File 'lib/iev/db.rb', line 11 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.
21 22 23 |
# File 'lib/iev/db.rb', line 21 def fetch(code, lang) check_bibliocache(code, lang) end |