README.md in active_recall-1.1.0 vs README.md in active_recall-1.2.0
- old
+ new
@@ -27,13 +27,19 @@
Or install it yourself as:
$ gem install active_recall
## Usage
+You can configure the desired SRS algorithm during runtime:
+```ruby
+ActiveRecall.configure do |config|
+ config.algorithm_class = ActiveRecall::FibonacciSequence
+end
+```
+For Rails applications, try doing this from within an [initializer file](https://guides.rubyonrails.org/configuring.html#using-initializer-files).
-Assume you have an application allowing your users to study words in a foreign language. Using the <code>has_deck</code> method
-you can set up a deck of flashcards that the user will study:
+Assume you have an application allowing your users to study words in a foreign language. Using the `has_deck` method you can set up a deck of flashcards that the user will study:
```ruby
class Word < ActiveRecord::Base
end
@@ -46,11 +52,11 @@
```
You can add words and record attempts to guess the word as right or wrong. Various methods exist to allow you to access subsets of this collection:
```ruby
-# Initally adding a word
+# Initially adding a word
user.words << word
user.words.untested #=> [word]
# Guessing a word correctly
user.right_answer_for!(word)
@@ -62,19 +68,19 @@
# Listing all words
user.words #=> [word]
```
-As time passes words need to be reviewed to keep them fresh in memory:
+As time passes, words need to be reviewed to keep them fresh in memory:
```ruby
# Three days later...
user.words.known #=> []
user.words.expired #=> [word]
```
-Guessing a word correcly several times in a row results in the word taking longer to expire, and demonstrates mastery of that word.
+Guessing a word correctly several times in a row results in the word taking longer to expire, and demonstrates mastery of that word.
```ruby
user.right_answer_for!(word)
# One week later...
user.words.expired #=> [word]
@@ -87,10 +93,10 @@
```
Reviewing
---------
-In addition to an <code>expired</code> method, ActiveRecall provides a suggested reviewing sequence for all unknown words in the deck.
+In addition to an `expired` method, ActiveRecall provides a suggested reviewing sequence for all unknown words in the deck.
Words are randomly chosen from all untested words, failed, and finally expired in order of precedence.
```ruby
user.words.review #=> [word]
user.right_answer_for!(word)