Module: Origami::ObjectCache
- Included in:
- CompoundObject
- Defined in:
- lib/origami/compound.rb
Overview
Module for maintaining internal caches of objects for fast lookup.
Instance Attribute Summary collapse
-
#names_cache ⇒ Object
readonly
Returns the value of attribute names_cache.
-
#strings_cache ⇒ Object
readonly
Returns the value of attribute strings_cache.
-
#xref_cache ⇒ Object
readonly
Returns the value of attribute xref_cache.
Instance Method Summary collapse
Instance Attribute Details
permalink #names_cache ⇒ Object (readonly)
Returns the value of attribute names_cache.
29 30 31 |
# File 'lib/origami/compound.rb', line 29 def names_cache @names_cache end |
Instance Method Details
permalink #initialize(*args) ⇒ Object
[View source]
31 32 33 34 35 |
# File 'lib/origami/compound.rb', line 31 def initialize(*args) super(*args) init_caches end |
permalink #rebuild_caches ⇒ Object
[View source]
37 38 39 40 41 42 43 44 |
# File 'lib/origami/compound.rb', line 37 def rebuild_caches self.each do |*items| items.each do |object| object.rebuild_caches if object.is_a?(CompoundObject) cache_object(object) end end end |