repetition 1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/repetition.rb +5 -5
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89fa95239d478362f8cab88f40a62ee975d4d99c
|
4
|
+
data.tar.gz: 6fe83ccf267e5d018c51ad8400afbcb25e258aa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe30561431c38311506b689e146df2396562c726f3bf5775596ac6c891cec2407cb33c90c9124c9df334269f6355ff21311d84436743f8052210b519a67ebb7
|
7
|
+
data.tar.gz: c757c5d9ac663120acd496682f36d4098dc8abd10cca25208fa36b24332c397bb24b5cee2e73d5f5b5c225ae115066ac273ad811a33d9d2d8b1bb87890178a03
|
data/lib/repetition.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
module Repetition
|
2
2
|
def reset_spaced_repetition_data
|
3
|
-
self.easiness_factor = 2.5
|
4
|
-
self.number_repetitions = 0
|
5
|
-
self.quality_of_last_recall = nil
|
3
|
+
self.easiness_factor = 2.5
|
4
|
+
self.number_repetitions = 0
|
5
|
+
self.quality_of_last_recall = nil
|
6
6
|
self.repetition_interval = nil
|
7
7
|
self.next_repetition = nil
|
8
8
|
self.last_studied = nil
|
9
9
|
end
|
10
10
|
|
11
11
|
def process_recall_result(quality_of_recall)
|
12
|
-
unless (
|
12
|
+
unless (1..5).include?(quality_of_recall)
|
13
13
|
raise 'Invalid quality of recall. Should be in range from 0 to 5.'
|
14
14
|
end
|
15
15
|
|
16
|
-
if quality_of_recall < 3
|
16
|
+
if quality_of_recall < 3
|
17
17
|
self.number_repetitions = 0
|
18
18
|
self.repetition_interval = 0
|
19
19
|
else
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repetition
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danya Kim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
12
|
-
dependencies:
|
11
|
+
date: 2014-06-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: Spaced repetition algorithm (SuperMemo 2) module that can be used as
|
14
28
|
a mixin
|
15
29
|
email: itsdanya@gmail.com
|