class Prawn::ThreadLocalCache
@private
Public Class Methods
new()
click to toggle source
# File lib/prawn/utilities.rb, line 35 def initialize @cache_id = "cache_#{self.object_id}".to_sym end
Public Instance Methods
[](key)
click to toggle source
# File lib/prawn/utilities.rb, line 38 def [](key) (Thread.current[@cache_id] ||= {})[key] end
[]=(key,value)
click to toggle source
# File lib/prawn/utilities.rb, line 41 def []=(key,value) (Thread.current[@cache_id] ||= {})[key] = value end