Class: Nanoc::Helpers::Capturing::CapturesStore Private

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/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)

Constructor Details

- (CapturesStore) initialize

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



39
40
41
# File 'lib/nanoc/helpers/capturing.rb', line 39

def initialize
  @store = {}
end

Instance Method Details

- (Object) [](item, name)

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.



48
49
50
51
# File 'lib/nanoc/helpers/capturing.rb', line 48

def [](item, name)
  @store[item.identifier] ||= {}
  @store[item.identifier][name]
end

- (Object) []=(item, name, content)

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.



43
44
45
46
# File 'lib/nanoc/helpers/capturing.rb', line 43

def []=(item, name, content)
  @store[item.identifier] ||= {}
  @store[item.identifier][name] = content
end