Class: Exlibris::Aleph::TablesManager
- Inherits:
-
Object
- Object
- Exlibris::Aleph::TablesManager
- Includes:
- Singleton
- Defined in:
- lib/exlibris/aleph/tables_manager.rb
Constant Summary collapse
- TIME_TO_LIVE =
Number of seconds before the table is considered expired, 86400 seconds is 1 day
86400
Instance Method Summary collapse
- #collections ⇒ Object
- #expired? ⇒ Boolean
- #item_circulation_policies ⇒ Object
- #item_display_masks ⇒ Object
- #patron_circulation_policies ⇒ Object
- #patron_statuses ⇒ Object
- #sub_libraries ⇒ Object
Instance Method Details
#collections ⇒ Object
21 22 23 24 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 21 def collections reset! if expired? @collections ||= Table::Collections.new end |
#expired? ⇒ Boolean
12 13 14 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 12 def expired? Time.now > expiration_date end |
#item_circulation_policies ⇒ Object
36 37 38 39 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 36 def item_circulation_policies reset! if expired? @item_circulation_policies ||= Table::Item::CirculationPolicies.new end |
#item_display_masks ⇒ Object
41 42 43 44 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 41 def item_display_masks reset! if expired? @item_display_masks ||= Table::Item::DisplayMasks.new end |
#patron_circulation_policies ⇒ Object
31 32 33 34 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 31 def patron_circulation_policies reset! if expired? @patron_circulation_policies ||= Table::Patron::CirculationPolicies.new end |
#patron_statuses ⇒ Object
26 27 28 29 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 26 def patron_statuses reset! if expired? @patron_statuses ||= Table::Patron::Statuses.new end |
#sub_libraries ⇒ Object
16 17 18 19 |
# File 'lib/exlibris/aleph/tables_manager.rb', line 16 def sub_libraries reset! if expired? @sub_libraries ||= Table::SubLibraries.new end |