regis 0.0.6 → 0.0.7
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 +8 -8
- data/lib/regis/responses/models/section.rb +37 -0
- data/lib/regis/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzE1MGQ0MmI1NTliMjRjY2YwYzhkMDRlMDEwZjA5NWNiMDA3ZjdjOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzExNTA5YzI3NjdiYjk4ODliOTE1OTExMDg0OTUwY2M0MWFjY2ZmMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjQ3YWViMDRhY2M1MzM0NmNjZWZiM2ZmN2U1ZjZhZGRiNDYyODBiNTAyZDhj
|
10
|
+
ZjA3MDQ0ZjkyOTY0ZjVlZDk3ZWEwYjIyZjBjZTMwYjUyZGEwMjQzN2Q0OTRh
|
11
|
+
NTBiZGNmY2Q0NGYwZDk1MmJmNjk2N2JlNDM3YWU5M2U4YTg5Y2E=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmIxNjViYmYzODRkMjBjNGVkZDEwN2I1Njg4NGFjZWRhMjRiNjZmMzI1MGIw
|
14
|
+
NDA5OTY4YTcxMThlNTg5N2UwNGJjZjNmODcxN2MzMmUzYjVkOTNiYjcyOTky
|
15
|
+
NDZiNTczZDY3NmY0NzRkOWE4YmZiNzQ0YjU4YWM5MTg4NDMyYmQ=
|
@@ -48,6 +48,43 @@ module Regis
|
|
48
48
|
|
49
49
|
@instructors = parse(@instructors, Instructor)
|
50
50
|
end
|
51
|
+
|
52
|
+
def formatted_start_date(format="%b %-d")
|
53
|
+
DateTime.strptime(self[:start_date],"%m\/%d\/%y").strftime(format)
|
54
|
+
end
|
55
|
+
|
56
|
+
def formatted_end_date(format="%b %-d")
|
57
|
+
DateTime.strptime(self[:end_date],"%m\/%d\/%y").strftime(format)
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.formatted_term(value)
|
61
|
+
return value.gsub("WI"," Winter Term").gsub("SUR"," Summer Term").gsub("SU", " Summer (Distance)").gsub("FA"," Fall Term").gsub("SP", " Spring Session").gsub("SS", " Summer Session")
|
62
|
+
end
|
63
|
+
|
64
|
+
def formatted_term
|
65
|
+
if self.term["SU"] and self.location_code["VAN"]
|
66
|
+
Section.formatted_term(self.term.gsub("SU","SUR")) # on-campus "SU" courses are guided studies, theses, major projects, etc. Term needs to not translate as Distance.
|
67
|
+
else
|
68
|
+
Section.formatted_term(self.term)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def self.formatted_location(value)
|
73
|
+
return value.gsub("VAN"," Vancouver").gsub("AUDIO", " Distance").gsub("PARA", " Para-church").gsub("IV", " Intervarsity").gsub("SKAG", " Skagit Valley").gsub("KENYA", " Kenya").gsub("CAM", " Costa Rica").gsub("EU", " France").gsub("ME", " Israel & Palestine")
|
74
|
+
end
|
75
|
+
|
76
|
+
def formatted_location
|
77
|
+
self[:location].present?? Section.formatted_location(self[:location]) : ""
|
78
|
+
end
|
79
|
+
|
80
|
+
def formatted_instructors(options = {:linked => true })
|
81
|
+
ret = Array.new
|
82
|
+
for i in self.instructors
|
83
|
+
ret << "#{i.full_name} "
|
84
|
+
end
|
85
|
+
end
|
86
|
+
return ret
|
87
|
+
end
|
51
88
|
end
|
52
89
|
end
|
53
90
|
end
|
data/lib/regis/version.rb
CHANGED