FunctionManager
Each time a function is registered with the analyser, add a method to the analysis_methods module. Expects the object that is extended to define ‘analyse(method, *args)’
# File lib/dragonfly/analyser.rb, line 37 def add(name, *args, &block) analysis_methods.module_eval %( def #{name}(*args) analyse(:#{name}, *args) end ) analysis_method_names << name.to_sym super end
# File lib/dragonfly/analyser.rb, line 22 def analyse(temp_object, method, *args) if enable_cache key = [temp_object.unique_id, method, *args] cache[key] ||= call_last(method, temp_object, *args) else call_last(method, temp_object, *args) end rescue NotDefined, UnableToHandle => e log.warn(e.message) nil end
Generated with the Darkfish Rdoc Generator 2.