after_the_deadline
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:A ruby library for playing with After The Deadline service.
# After The Deadline - Ruby Library

Ruby library for working with After The Deadline service.
See https://www.afterthedeadline.com/api.html for the API documentation.

## Installation

Add this line to your application's Gemfile:

    gem 'after_the_deadline'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install after_the_deadline

## Standard Usage

    require 'after_the_deadline'
    AfterTheDeadline(nil, nil) # no custom dictionary, accept all error types

### No Errors

    AfterTheDeadline.check 'this text is clean.'
    => []

### Error: Missing Apostrophe

    AfterTheDeadline.check 'this text isnt clean.'
    => [#]

### Error: Passive Voice

    errors = AfterTheDeadline.check 'this text should be written in a passive voice.'
    => [#]

### Information on the Passive Voice Error

    errors.first.info
    => "

Revise should be with active voice

\n\n

Active voice makes it clear who is doing what. In an active sentence, the person that is acting is the subject. Passive sentences obscure or omit the sentence \nsubject.

Use passive voice when the sentence object is more important than the subject. The active voice is generally easier to read.\n
\n
Examples (subject, object)\n
\n
Before: Our results will be discussed.\n
After: We will discuss our results.\n
\n
Before: Wolverine was made to be a weapon.\n
After: The government made Wolverine. Wolverine is a weapon.

" ### Metrics AfterTheDeadline.metrics 'this text should be written in a passive voice. another sentence is used to get more data in the metrics.' => #"20", "sentences"=>"1"}, @grammer={}, @spell={}, @style={"passive voice"=>"2"}> ## Ignoring Specific Types of Errors require 'after_the_deadline' AfterTheDeadline(nil, ['Passive voice']) ### Skip the Passive Voice Error errors = AfterTheDeadline.check 'this text should be written in a passive voice.' => [] ## Using a Custom Dictionary require 'after_the_deadline' AfterTheDeadline(['Sepcot']) # or AfterTheDeadline('path/to/filename') AfterTheDeadline.check "My last name, Sepcot, is very unique." => [] ## Multilanguage After the deadline service provides 5 languages: * English (en, default) * French (fr) * German (de) * Spanish (es) * Portuguese (pt) If no language is set English is choosen by default. To set another language simply set it: AfterTheDeadline.set_language('de') # possible values en, fr, de, es, pt ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。