Class: Mnemosyne::Registry::Monitor
- Inherits:
-
Object
- Object
- Mnemosyne::Registry::Monitor
- Defined in:
- lib/mnemosyne/registry.rb
Instance Method Summary collapse
- #<<(registration) ⇒ Object
- #delete(path) ⇒ Object
-
#initialize ⇒ Monitor
constructor
A new instance of Monitor.
Constructor Details
#initialize ⇒ Monitor
Returns a new instance of Monitor.
71 72 73 |
# File 'lib/mnemosyne/registry.rb', line 71 def initialize @requirements = Hash.new {|h, k| h[k] = Set.new } end |
Instance Method Details
#<<(registration) ⇒ Object
79 80 81 82 83 |
# File 'lib/mnemosyne/registry.rb', line 79 def <<(registration) registration.require_paths.each do |path| @requirements[path] << registration end end |
#delete(path) ⇒ Object
75 76 77 |
# File 'lib/mnemosyne/registry.rb', line 75 def delete(path) @requirements.delete(path) end |