Class: Exlibris::Aleph::TablesManager

Inherits:
Object
  • Object
show all
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

Instance Method Details

#collectionsObject



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

Returns:

  • (Boolean)


12
13
14
# File 'lib/exlibris/aleph/tables_manager.rb', line 12

def expired?
  Time.now > expiration_date
end

#item_circulation_policiesObject



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_masksObject



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_policiesObject



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_statusesObject



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_librariesObject



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