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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 232b1d7fd959f48ed2923c81a67bf0adede85fed
4
- data.tar.gz: 55e09181ed74124ab5839d3cd54e53164026d6e5
3
+ metadata.gz: 0b24ba82f895dd7d40cc6112c331a8c5470787ba
4
+ data.tar.gz: 6c45e9199ab7cf01aa6d834b353aed07f581c30d
5
5
  SHA512:
6
- metadata.gz: 952cf6b5ca4596d6a3796745ed9927c971c94177f3833f72010959546d6fddc2f5eed3dfc1376f14977860c6ccf8c1cae877d77773fd63ca750b9b67e8e670bf
7
- data.tar.gz: ce280ca40dfd635f5dd794833883bb1fae92682bfb4c2994bfaf227d7bd5e0ef17e153648869c9e8ad781eedd2234d6b509894de108281e58cc5d1235fcf42c4
6
+ metadata.gz: 75684c78e44390a2bf96d7b0bc2d57ef6085b75c39f6ef529c9dd21e30cffec158b6d0f009a91f4574b1ba8138b9c1299170ce91fed9b96fadaa9a07b78ee5a4
7
+ data.tar.gz: ab1471b86e37042689131017c18b8c7296f31d337baadfc46319d0fa538c2419826e3b7c253f7c198ae272bcc0bedda346e0729820cf36b5d9e987d8acf673dd
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Curricula
2
2
 
3
- TODO: Write a gem description
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.inject :+
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 #rescue error :format
76
+ end rescue error :format
77
77
  end
78
78
 
79
79
  def course_hours course, visited = []
@@ -1,3 +1,3 @@
1
1
  module Curricula
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curricula
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Piro-Rael