Module: Plagiarism
- Defined in:
- lib/plagiarism.rb,
lib/plagiarism/search.rb,
lib/plagiarism/balance.rb,
lib/plagiarism/request.rb,
lib/plagiarism/response.rb,
lib/plagiarism/url_search.rb,
lib/plagiarism/text_search.rb
Defined Under Namespace
Classes: Balance, Request, Response, Search, TextSearch, URLSearch
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.response_format ⇒ Object
readonly
Returns the value of attribute response_format.
-
.test_mode ⇒ Object
Returns the value of attribute test_mode.
-
.username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
-
.balance ⇒ Object
Return the current balance (in cents) in your Copyscape account.
- .configure {|_self| ... } ⇒ Object
-
.credits ⇒ Object
Return the number remaining credits in your Copyscape account.
-
.text_search(text, options = {}) ⇒ Object
Search for copies of some text.
-
.url_search(url, options = {}) ⇒ Object
Search for copies of a web page.
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
17 18 19 |
# File 'lib/plagiarism.rb', line 17 def api_key @api_key end |
.response_format ⇒ Object (readonly)
Returns the value of attribute response_format.
16 17 18 |
# File 'lib/plagiarism.rb', line 16 def response_format @response_format end |
.test_mode ⇒ Object
Returns the value of attribute test_mode.
17 18 19 |
# File 'lib/plagiarism.rb', line 17 def test_mode @test_mode end |
.username ⇒ Object
Returns the value of attribute username.
17 18 19 |
# File 'lib/plagiarism.rb', line 17 def username @username end |
Class Method Details
.balance ⇒ Object
Return the current balance (in cents) in your Copyscape account
27 28 29 |
# File 'lib/plagiarism.rb', line 27 def balance Balance.amount end |
.configure {|_self| ... } ⇒ Object
19 20 21 22 |
# File 'lib/plagiarism.rb', line 19 def configure yield self self end |
.credits ⇒ Object
Return the number remaining credits in your Copyscape account
34 35 36 |
# File 'lib/plagiarism.rb', line 34 def credits Balance.credits end |
.text_search(text, options = {}) ⇒ Object
Search for copies of some text
Options:
encoding:
UTF-8, ISO-8859-1, etc. (default is UTF-8)
scope:
public, private, full (default is public)
full_comparisons:
number of full-text comparisons to request on matching
results (default is 0, maximum is 10).
53 54 55 |
# File 'lib/plagiarism.rb', line 53 def text_search(text, = {}) TextSearch.new(text, ) end |
.url_search(url, options = {}) ⇒ Object
Search for copies of a web page
Options:
scope:
public, private, full (default is public)
full_comparisons:
number of full-text comparisons to request on matching
results (default is 0, maximum is 10).
69 70 71 |
# File 'lib/plagiarism.rb', line 69 def url_search(url, = {}) URLSearch.new(url, ) end |