Skip to content
Free open source spelling and grammar checker using Ruby client.
Ruby Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
spec
.gitignore
.ruby-gemset
.ruby-version
Gemfile
LICENSE.txt
README.md
Rakefile
grammarbot.gemspec

README.md

Grammarbot

A Ruby API client for GrammrBot API

Installation

Add this line to your application's Gemfile:

gem 'grammarbot'

And then execute:

$ bundle

Or install it yourself as:

$ gem install grammarbot

Usage

Client initialization, api_key, language and base_uri are optional and could be ommited, or defined later

gbot = Grammarbot::Client.new(api_key: 'grammarbot_default_key', language: 'en-US', base_uri: 'http://api.grammarbot.io')

gbot.api_key = 'new_api_key'
gbot.language = 'en-GB'
gbot.base_uri = 'http://pro.grammarbot.io'

Don't want to check the key into source control? Put the key on the GRAMMARBOT_API_KEY environment variable!

Simple example

result = gbot.check("I can't remember how to go their.")

result.language.code # => 'en-US'
result.matches.size # => 1
result.matches.first.message # => "Statistics suggests that 'there' (as in 'Is there an answer?') might be the correct word here, not 'their' (as in 'It’s not their fault.'). Please check."

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/GrammarBot-API/grammarbot-rb.

License

The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.