module Test::Unit::Attribute::ClassMethods
def find_attribute(method_name, name, options={})
def find_attribute(method_name, name, options={}) recursive_p = options[:recursive] recursive_p = true if recursive_p.nil? @attributes_table ||= StringifyKeyHash.new if @attributes_table.key?(method_name) attributes = @attributes_table[method_name] if attributes.key?(name) return attributes[name] end end return nil unless recursive_p return nil if self == TestCase @cached_parent_test_case ||= ancestors.find do |ancestor| ancestor != self and ancestor.is_a?(Class) and ancestor < Test::Unit::Attribute end return nil if @cached_parent_test_case.nil? @cached_parent_test_case.find_attribute(method_name, name, options) end