curricula 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/curricula.rb +2 -2
- data/lib/curricula/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b24ba82f895dd7d40cc6112c331a8c5470787ba
|
4
|
+
data.tar.gz: 6c45e9199ab7cf01aa6d834b353aed07f581c30d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75684c78e44390a2bf96d7b0bc2d57ef6085b75c39f6ef529c9dd21e30cffec158b6d0f009a91f4574b1ba8138b9c1299170ce91fed9b96fadaa9a07b78ee5a4
|
7
|
+
data.tar.gz: ab1471b86e37042689131017c18b8c7296f31d337baadfc46319d0fa538c2419826e3b7c253f7c198ae272bcc0bedda346e0729820cf36b5d9e987d8acf673dd
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Curricula
|
2
2
|
|
3
|
-
|
3
|
+
A gem for analyzing degree plan complexity at UNM.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -44,6 +44,13 @@ Then, compute the efficiency. Lower is better:
|
|
44
44
|
my_plan.efficiency
|
45
45
|
```
|
46
46
|
|
47
|
+
The `cruciality` method will return an array of arrays with the cruciality of
|
48
|
+
each course next to it. The cruciality is based on how many other courses need
|
49
|
+
that particular course.
|
50
|
+
```ruby
|
51
|
+
my_plan.cruciality
|
52
|
+
```
|
53
|
+
|
47
54
|
If you need a list of courses (as a hash), use `course_list`:
|
48
55
|
|
49
56
|
```ruby
|
data/lib/curricula.rb
CHANGED
@@ -62,7 +62,7 @@ module Curricula
|
|
62
62
|
build_courses
|
63
63
|
all_hours = @courses.each_value.map &method(:course_hours)
|
64
64
|
@course_hours = @courses.each_value.map(&:name).zip(all_hours).to_h
|
65
|
-
@efficiency = all_hours.
|
65
|
+
@efficiency = all_hours.reduce :+
|
66
66
|
end
|
67
67
|
|
68
68
|
def build_courses
|
@@ -73,7 +73,7 @@ module Curricula
|
|
73
73
|
else
|
74
74
|
@courses[row.first] = Course.new row.first, row.last
|
75
75
|
end
|
76
|
-
end
|
76
|
+
end rescue error :format
|
77
77
|
end
|
78
78
|
|
79
79
|
def course_hours course, visited = []
|
data/lib/curricula/version.rb
CHANGED