class ActiveFedora::AttributeMethods::AttributeMethodCache
def [](name)
def [](name) @method_cache.compute_if_absent(name) do safe_name = name.unpack('h*').first temp_method = "__temp__#{safe_name}" ActiveFedora::AttributeMethods::AttrNames.set_name_cache safe_name, name @module.module_eval method_body(temp_method, safe_name), __FILE__, __LINE__ @module.instance_method temp_method end end
def initialize
def initialize @module = Module.new @method_cache = ThreadSafe::Cache.new end
def method_body; raise NotImplementedError; end
def method_body; raise NotImplementedError; end