Class: PCR
- Inherits:
-
Object
show all
- Defined in:
- lib/pcr-ruby.rb
Overview
PCR class handles token and api url, so both are easily changed
Instance Method Summary
collapse
Constructor Details
#initialize(token, api_endpt = "http://api.penncoursereview.com/v1/") ⇒ PCR
Returns a new instance of PCR.
9
10
11
12
|
# File 'lib/pcr-ruby.rb', line 9
def initialize(token, api_endpt = "http://api.penncoursereview.com/v1/")
@@token = token
@@api_endpt = api_endpt
end
|
Instance Method Details
#course(course_code) ⇒ Object
14
15
16
|
# File 'lib/pcr-ruby.rb', line 14
def course(course_code)
Course.new(course_code)
end
|
#instructor(id) ⇒ Object
22
23
24
|
# File 'lib/pcr-ruby.rb', line 22
def instructor(id)
Instructor.new(id)
end
|
#section(id, hit_api = true) ⇒ Object
18
19
20
|
# File 'lib/pcr-ruby.rb', line 18
def section(id, hit_api = true)
Section.new(id, hit_api)
end
|