Class: Nanoc3::Helpers::Capturing::CapturesStore Private
- Inherits:
-
Object
- Object
- Nanoc3::Helpers::Capturing::CapturesStore
- Includes:
- Singleton
- Defined in:
- lib/nanoc3/helpers/capturing.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.
Instance Method Summary collapse
- #[](item, name) ⇒ Object private
- #[]=(item, name, content) ⇒ Object private
-
#initialize ⇒ CapturesStore
constructor
private
A new instance of CapturesStore.
Constructor Details
#initialize ⇒ CapturesStore
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 CapturesStore.
45 46 47 |
# File 'lib/nanoc3/helpers/capturing.rb', line 45 def initialize @store = {} end |
Instance Method Details
#[](item, name) ⇒ 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.
54 55 56 57 |
# File 'lib/nanoc3/helpers/capturing.rb', line 54 def [](item, name) @store[item.identifier] ||= {} @store[item.identifier][name] end |
#[]=(item, name, content) ⇒ 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.
49 50 51 52 |
# File 'lib/nanoc3/helpers/capturing.rb', line 49 def []=(item, name, content) @store[item.identifier] ||= {} @store[item.identifier][name] = content end |