Class: DBC::Cohort

Inherits:
DbcObject show all
Defined in:
lib/dbc/cohort.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DbcObject

all, find

Constructor Details

#initialize(attributes) ⇒ Cohort

Returns a new instance of Cohort.



3
4
5
6
# File 'lib/dbc/cohort.rb', line 3

def initialize(attributes)
  super
  @students.map! { |user| DBC::User.new(user) }
end

Class Method Details

.endpoint(id = '') ⇒ Object



8
9
10
# File 'lib/dbc/cohort.rb', line 8

def self.endpoint(id = '')
  "/cohorts/" + id.to_s
end