Module: Hibiki::Observer
Overview
---- shared observer behaviour ---------------------------------------------- The reverse edges of Trackable: what an observer read on its last run.
Instance Method Summary collapse
- #add_source(source) ⇒ Object
-
#clear_sources ⇒ Object
Solid clears deps before rerun (cleanNode); we mirror that, so stale branches of dynamic deps (flag ? a : b) stop invalidating us.
- #sources ⇒ Object
Instance Method Details
#add_source(source) ⇒ Object
83 |
# File 'lib/hibiki/tracking.rb', line 83 def add_source(source) = sources << source |
#clear_sources ⇒ Object
Solid clears deps before rerun (cleanNode); we mirror that, so stale branches of dynamic deps (flag ? a : b) stop invalidating us.
87 88 89 90 |
# File 'lib/hibiki/tracking.rb', line 87 def clear_sources sources.each { |source| source.unsubscribe(self) } sources.clear end |
#sources ⇒ Object
82 |
# File 'lib/hibiki/tracking.rb', line 82 def sources = (@sources ||= Set.new) |