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
#names_cache ⇒ Object (readonly)
Returns the value of attribute names_cache.
26 27 28 |
# File 'lib/origami/compound.rb', line 26 def names_cache @names_cache end |
#strings_cache ⇒ Object (readonly)
Returns the value of attribute strings_cache.
26 27 28 |
# File 'lib/origami/compound.rb', line 26 def strings_cache @strings_cache end |
#xref_cache ⇒ Object (readonly)
Returns the value of attribute xref_cache.
26 27 28 |
# File 'lib/origami/compound.rb', line 26 def xref_cache @xref_cache end |
Instance Method Details
#initialize(*args) ⇒ Object
28 29 30 31 32 |
# File 'lib/origami/compound.rb', line 28 def initialize(*args) super init_caches end |
#rebuild_caches ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/origami/compound.rb', line 34 def rebuild_caches each do |*items| items.each do |object| object.rebuild_caches if object.is_a?(CompoundObject) cache_object(object) end end end |