gpa 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gpa.rb +1 -8
- data/lib/gpa/course.rb +1 -10
- data/lib/gpa/version.rb +1 -1
- data/spec/course_spec.rb +1 -1
- data/spec/gpa_spec.rb +2 -0
- metadata +2 -2
data/lib/gpa.rb
CHANGED
@@ -3,14 +3,7 @@ require "gpa/course"
|
|
3
3
|
|
4
4
|
require 'dmorrill10-utils/enumerable'
|
5
5
|
require 'yaml'
|
6
|
-
|
7
|
-
module YAML
|
8
|
-
# Load the document contained in +filename+. Returns the yaml contained in
|
9
|
-
# +filename+ as a ruby object
|
10
|
-
def self.load_stream_from_file filename
|
11
|
-
File.open(filename, 'r:bom|utf-8') { |f| self.load_stream f, filename }
|
12
|
-
end
|
13
|
-
end
|
6
|
+
require 'dmorrill10-utils/yaml'
|
14
7
|
|
15
8
|
class Array
|
16
9
|
# @param [Integer] num_most_recent_units
|
data/lib/gpa/course.rb
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
# @todo Move to utils
|
2
|
-
class Object
|
3
|
-
def to_h
|
4
|
-
Hash[instance_variables.map do |var|
|
5
|
-
[var[1..-1].to_sym, instance_variable_get(var)]
|
6
|
-
end]
|
7
|
-
end
|
8
|
-
end
|
9
|
-
|
10
1
|
class String
|
11
2
|
# @returns [Numeric] Number of grade points for this grade
|
12
3
|
def points
|
@@ -185,7 +176,7 @@ class Course
|
|
185
176
|
# @returns [String]
|
186
177
|
:faculty
|
187
178
|
)
|
188
|
-
|
179
|
+
|
189
180
|
def initialize(
|
190
181
|
subject,
|
191
182
|
number,
|
data/lib/gpa/version.rb
CHANGED
data/spec/course_spec.rb
CHANGED
data/spec/gpa_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gpa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dmorrill10-utils
|