Module: MongoWatchable
- Defined in:
- lib/mongo_watchable.rb,
lib/mongo_watchable/proxy.rb,
lib/mongo_watchable/watcher.rb,
lib/mongo_watchable/watchable.rb
Defined Under Namespace
Modules: Watchable, Watcher
Classes: Proxy
Class Method Summary
collapse
Class Method Details
.register_watchable(watchable) ⇒ Object
4
5
6
7
|
# File 'lib/mongo_watchable.rb', line 4
def self.register_watchable(watchable)
@watchables ||= ActiveSupport::OrderedHash.new
@watchables[watchable.name] = watchable
end
|
.register_watcher(watcher) ⇒ Object
14
15
16
17
|
# File 'lib/mongo_watchable.rb', line 14
def self.register_watcher(watcher)
@watchers ||= ActiveSupport::OrderedHash.new
@watchers[watcher.name] = watcher
end
|
.watchables ⇒ Object
9
10
11
12
|
# File 'lib/mongo_watchable.rb', line 9
def self.watchables
@watchables ||= ActiveSupport::OrderedHash.new
@watchables.values
end
|
.watchers ⇒ Object
19
20
21
22
|
# File 'lib/mongo_watchable.rb', line 19
def self.watchers
@watchers ||= ActiveSupport::OrderedHash.new
@watchers.values
end
|