Class: LearnSprout::Org
- Inherits:
-
Object
- Object
- LearnSprout::Org
- Defined in:
- lib/learnsprout/org.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#org_id ⇒ Object
Returns the value of attribute org_id.
Instance Method Summary collapse
- #course(course_id) ⇒ Object
- #courses ⇒ Object
-
#initialize(attrs = {}) ⇒ Org
constructor
A new instance of Org.
- #school(school_id) ⇒ Object
- #schools ⇒ Object
- #section(section_id) ⇒ Object
- #sections ⇒ Object
- #student(student_id) ⇒ Object
- #students ⇒ Object
- #teacher(teacher_id) ⇒ Object
- #teachers ⇒ Object
- #term(term_id) ⇒ Object
- #terms ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Org
Returns a new instance of Org.
7 8 9 10 11 |
# File 'lib/learnsprout/org.rb', line 7 def initialize(attrs={}) @client = attrs["client"] @org_id = attrs["id"] @name = attrs["name"] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/learnsprout/org.rb', line 4 def name @name end |
#org_id ⇒ Object
Returns the value of attribute org_id.
4 5 6 |
# File 'lib/learnsprout/org.rb', line 4 def org_id @org_id end |
Instance Method Details
#course(course_id) ⇒ Object
57 58 59 |
# File 'lib/learnsprout/org.rb', line 57 def course(course_id) @client.course(@org_id, course_id) end |
#courses ⇒ Object
53 54 55 |
# File 'lib/learnsprout/org.rb', line 53 def courses @client.courses(@org_id) end |
#school(school_id) ⇒ Object
13 14 15 |
# File 'lib/learnsprout/org.rb', line 13 def school(school_id) @client.school(@org_id, school_id) end |
#schools ⇒ Object
17 18 19 |
# File 'lib/learnsprout/org.rb', line 17 def schools @client.schools(@org_id) end |
#section(section_id) ⇒ Object
33 34 35 |
# File 'lib/learnsprout/org.rb', line 33 def section(section_id) @client.section(@org_id, section_id) end |
#sections ⇒ Object
29 30 31 |
# File 'lib/learnsprout/org.rb', line 29 def sections @client.sections(@org_id) end |
#student(student_id) ⇒ Object
25 26 27 |
# File 'lib/learnsprout/org.rb', line 25 def student(student_id) @client.student(@org_id, student_id) end |
#students ⇒ Object
21 22 23 |
# File 'lib/learnsprout/org.rb', line 21 def students @client.students(@org_id) end |
#teacher(teacher_id) ⇒ Object
41 42 43 |
# File 'lib/learnsprout/org.rb', line 41 def teacher(teacher_id) @client.teacher(@org_id, teacher_id) end |
#teachers ⇒ Object
37 38 39 |
# File 'lib/learnsprout/org.rb', line 37 def teachers @client.teachers(@org_id) end |
#term(term_id) ⇒ Object
49 50 51 |
# File 'lib/learnsprout/org.rb', line 49 def term(term_id) @client.term(@org_id, term_id) end |
#terms ⇒ Object
45 46 47 |
# File 'lib/learnsprout/org.rb', line 45 def terms @client.terms(@org_id) end |