Sha256: 8ddb7a0e86a5b4044b9e63d18ccba2e33b477c565346c2d8fefb7b5a4203a4d2

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

require 'plagiarism/strategries/engine'
require 'plagiarism/strategries/google'
require 'plagiarism/strategries/bing'
require 'plagiarism/strategries/duck'
require 'plagiarism/strategries/yahoo'

module Plagiarism
  module Strategy
    extend self

    def get(name = :google)
      Strategies.const_get(name.to_s.sub(/\S/, &:upcase))
    end

    def unique?(content, params)
      Config.strategies.all? do |strategy|
        klass = get(strategy)
        klass.new(content, params).unique?
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plagiarism2-0.0.5 lib/plagiarism/strategy.rb