Anons79 Mini Shell

Directory : /opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/test-unit-3.2.7/lib/test/unit/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/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

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]