Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
English verb conjugation for Ruby (and Rails)

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.document
.gitignore
Gemfile
LICENSE
README.rdoc
Rakefile
VERSION
verbs.gemspec

README.rdoc

verbs

Conjugates most common english verbs for all persons, tenses, standard aspects, and modern moods (with active diathesis). Standard and exceptional spelling rules are obeyed.

>> Verbs::Conjugator.conjugate :be, :tense => :past, :person => :second, :plurality => :singular, :aspect => :perfective
=> :were
>> 'be nice'.verb.conjugate :subject => 'Matz'
=> "Matz is nice"
>> :sleep.verb.conjugate :tense => :future, :person => :first, :plurality => :singular, :aspect => :progressive, :subject => true
=> :"I will be sleeping"

Installation

The gem is hosted at gemcutter.org/gems/verbs

gem install verbs

Options

This library takes a rather strict view of English verb conjugation.

:tense

One of :past, :present, or :future. Defaults to :present.

:person

One of :first, :second, or :third. Defaults to :third.

:plurality

Either :singular or :plural. Defaults to :singular.

:aspect

One of :habitual, :perfect, :perfective, :progressive, or :prospective. Defaults to :habitual.

See below for a guide to verb aspect.

:mood

One of :indicative, :imperative, or :subjunctive. Defaults to :indicative.

:subject

Set this to a string to prepend the conjugated verb with it. When set to true, a standard personal pronoun will be used.

Tense/aspect quick reference

EXAMPLE                   TENSE    ASPECT

I usually accepted        past     habitual
I had accepted            past     perfect
I accepted                past     perfective
I was accepting           past     progressive
I was about to accept     past     prospective

I accept                  present  habitual
I have accepted           present  perfect
I am having accepted      present  perfective
I am accepting            present  progressive
I am about to accept      present  prospective

I will accept             future   habitual
I will have accepted      future   perfect
I will be having accepted future   perfective
I will be accepting       future   progressive
I will be about to accept future   prospective

Acknowledgements

Copyright

Copyright © 2009 Andy Rossmeissl. See LICENSE for details.

Something went wrong with that request. Please try again.