Class: RR::LoggedChangeLoaders
- Inherits:
-
Object
- Object
- RR::LoggedChangeLoaders
- Defined in:
- lib/rubyrep/logged_change_loader.rb
Overview
Makes management of logged change loaders easier
Instance Attribute Summary collapse
-
#loaders ⇒ Object
A hash of LoggedChangeLoader instances for the :
left
and :right
database. -
#session ⇒ Object
The current Session.
Instance Method Summary collapse
-
#[](database) ⇒ Object
Returns the LoggedChangeLoader for the specified (:
left
or :right
) database. -
#initialize(session) ⇒ LoggedChangeLoaders
constructor
Create new logged change loaders.
-
#update ⇒ Object
Forces an update of the change log cache.
Constructor Details
#initialize(session) ⇒ LoggedChangeLoaders
Create new logged change loaders.
-
session
: Current Session
14 15 16 17 18 19 20 |
# File 'lib/rubyrep/logged_change_loader.rb', line 14 def initialize(session) self.session = session self.loaders = {} [:left, :right].each do |database| loaders[database] = LoggedChangeLoader.new(session, database) end end |
Instance Attribute Details
#loaders ⇒ Object
A hash of LoggedChangeLoader instances for the :left
and :right
database
10 11 12 |
# File 'lib/rubyrep/logged_change_loader.rb', line 10 def loaders @loaders end |
#session ⇒ Object
The current Session
7 8 9 |
# File 'lib/rubyrep/logged_change_loader.rb', line 7 def session @session end |
Instance Method Details
#[](database) ⇒ Object
Returns the LoggedChangeLoader for the specified (:left
or :right
) database.
24 25 26 |
# File 'lib/rubyrep/logged_change_loader.rb', line 24 def [](database) loaders[database] end |
#update ⇒ Object
Forces an update of the change log cache
29 30 31 |
# File 'lib/rubyrep/logged_change_loader.rb', line 29 def update [:left, :right].each {|database| self[database].update :forced => true} end |