module Taipo::Cache
A cache of {Taipo::TypeElement} objects created from parsed type definitions
@since 1.0.0 @api private
Public Class Methods
[](k)
click to toggle source
Retrieve the {Taipo::TypeElement} object described by the type definition from the cache
@param k [String] the type definition
@return [Taipo::TypeElement] if the type definition has been saved @return [NilClass] if the type definition has not been saved
@since 1.0.0 @api private
# File lib/taipo/cache.rb, line 25 def self.[](k) @@Cache[k] end
[]=(k,v)
click to toggle source
Save the {Taipo::TypeElement} object described by the type definition in the cache
@param k [String] the type definition @param v [Taipo::TypeElement] the object to be saved
@return [Taipo::TypeElement] the object to be saved
@since 1.0.0 @api private
# File lib/taipo/cache.rb, line 39 def self.[]=(k,v) @@Cache[k] = v end
reset()
click to toggle source
Reset the cache
@since 1.0.0 @api private
# File lib/taipo/cache.rb, line 47 def self.reset() @@Cache = {} return nil end