Class: Nanoc::RuleMemoryStore Private
- Inherits:
-
Store
- Object
- Store
- Nanoc::RuleMemoryStore
- Defined in:
- lib/nanoc/base/compilation/rule_memory_store.rb
Overview
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.
Stores rule memories for objects that can be run through a rule (item representations and layouts).
Instance Attribute Summary
Attributes inherited from Store
Instance Method Summary (collapse)
-
- (Array) [](obj)
private
The rule memory for the given object.
-
- (void) []=(obj, rule_memory)
private
-
- (RuleMemoryStore) initialize(params = {})
constructor
private
A new instance of RuleMemoryStore.
Methods inherited from Store
#load, #no_data_found, #store, #unload, #version_mismatch_detected
Constructor Details
- (RuleMemoryStore) initialize(params = {})
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 RuleMemoryStore
13 14 15 16 17 18 19 |
# File 'lib/nanoc/base/compilation/rule_memory_store.rb', line 13 def initialize(params = {}) super('tmp/rule_memory', 1) @site = params[:site] if params.key?(:site) @rule_memories = {} end |
Instance Method Details
- (Array) [](obj)
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 The rule memory for the given object
25 26 27 |
# File 'lib/nanoc/base/compilation/rule_memory_store.rb', line 25 def [](obj) @rule_memories[obj.reference] end |
- (void) []=(obj, rule_memory)
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.
This method returns an undefined value.
35 36 37 |
# File 'lib/nanoc/base/compilation/rule_memory_store.rb', line 35 def []=(obj, rule_memory) @rule_memories[obj.reference] = rule_memory end |