Class: Nanoc::Core::DependencyTracker Private
- Inherits:
-
Object
- Object
- Nanoc::Core::DependencyTracker
- Includes:
- ContractsSupport
- Defined in:
- lib/nanoc/core/dependency_tracker.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: Null
Constant Summary collapse
- C_OBJ =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
C::Or[ Nanoc::Core::Item, Nanoc::Core::Layout, Nanoc::Core::Configuration, Nanoc::Core::IdentifiableCollection, ]
- C_RAW_CONTENT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
C::Or[ C::ArrayOf[C::Or[String, Regexp]], C::Bool, ]
- C_ATTR =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
C::Or[ C::ArrayOf[Symbol], C::HashOf[Symbol => C::Any], C::Bool, ]
- C_ARGS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
C::KeywordArgs[ raw_content: C::Optional[C_RAW_CONTENT], attributes: C::Optional[C_ATTR], compiled_content: C::Optional[C::Bool], path: C::Optional[C::Bool], ]
Instance Attribute Summary collapse
- #dependency_store ⇒ Object readonly private
- #root ⇒ Object readonly private
Instance Method Summary collapse
- #bounce(obj, raw_content: false, attributes: false, compiled_content: false, path: false) ⇒ Object private
-
#initialize(dependency_store, root:) ⇒ DependencyTracker
constructor
private
A new instance of DependencyTracker.
Methods included from ContractsSupport
enabled?, included, setup_once, warn_about_performance
Constructor Details
#initialize(dependency_store, root:) ⇒ DependencyTracker
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DependencyTracker.
41 42 43 44 |
# File 'lib/nanoc/core/dependency_tracker.rb', line 41 def initialize(dependency_store, root:) @dependency_store = dependency_store @root = root end |
Instance Attribute Details
#dependency_store ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/nanoc/core/dependency_tracker.rb', line 38 def dependency_store @dependency_store end |
#root ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
39 40 41 |
# File 'lib/nanoc/core/dependency_tracker.rb', line 39 def root @root end |
Instance Method Details
#bounce(obj, raw_content: false, attributes: false, compiled_content: false, path: false) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/nanoc/core/dependency_tracker.rb', line 47 def bounce( obj, raw_content: false, attributes: false, compiled_content: false, path: false ) Nanoc::Core::NotificationCenter.post(:dependency_created, @root, obj) @dependency_store.record_dependency( obj, @root, raw_content:, attributes:, compiled_content:, path:, ) end |