| Current Path : /proc/1412125/cwd/lib/ruby/gems/3.0.0/gems/test-unit-3.3.7/lib/test/unit/ |
| Current File : //proc/1412125/cwd/lib/ruby/gems/3.0.0/gems/test-unit-3.3.7/lib/test/unit/attribute-matcher.rb |
module Test
module Unit
class AttributeMatcher
def initialize(test)
@test = test
end
def match?(expression)
matched = instance_eval(expression)
if matched.nil?
false
else
matched
end
end
def method_missing(name, *args)
if args.empty?
@test[name]
else
super
end
end
end
end
end