Class: LearnSprout::Course
- Inherits:
-
Object
- Object
- LearnSprout::Course
- Defined in:
- lib/learnsprout/course.rb
Instance Attribute Summary collapse
-
#course_id ⇒ Object
Returns the value of attribute course_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#school_id ⇒ Object
Returns the value of attribute school_id.
-
#time_updated ⇒ Object
Returns the value of attribute time_updated.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Course
constructor
A new instance of Course.
- #school ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Course
Returns a new instance of Course.
10 11 12 13 14 15 16 17 18 |
# File 'lib/learnsprout/course.rb', line 10 def initialize(attrs={}) @client = attrs["client"] @org_id = attrs["org_id"] @course_id = attrs["id"] @name = attrs["name"] @number = attrs["number"] @time_updated = attrs["time_updated"] @school_id = attrs["school"]["id"] end |
Instance Attribute Details
#course_id ⇒ Object
Returns the value of attribute course_id.
4 5 6 |
# File 'lib/learnsprout/course.rb', line 4 def course_id @course_id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/learnsprout/course.rb', line 4 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
4 5 6 |
# File 'lib/learnsprout/course.rb', line 4 def number @number end |
#school_id ⇒ Object
Returns the value of attribute school_id.
4 5 6 |
# File 'lib/learnsprout/course.rb', line 4 def school_id @school_id end |
#time_updated ⇒ Object
Returns the value of attribute time_updated.
4 5 6 |
# File 'lib/learnsprout/course.rb', line 4 def time_updated @time_updated end |
Instance Method Details
#school ⇒ Object
20 21 22 |
# File 'lib/learnsprout/course.rb', line 20 def school @client.school(@org_id, @school_id) end |