Class: Clever::Types::Course

Inherits:
Base
  • Object
show all
Defined in:
lib/clever/types/course.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#blank?, #presence, #to_h

Constructor Details

#initialize(attributes = {}) ⇒ Course

Returns a new instance of Course.



12
13
14
15
16
17
18
# File 'lib/clever/types/course.rb', line 12

def initialize(attributes = {}, *)
  @uid      = attributes['id']
  @district = attributes['district']
  @name     = attributes['name']
  @number   = attributes['number']
  @provider = 'clever'
end

Instance Attribute Details

#districtObject (readonly)

Returns the value of attribute district.



6
7
8
# File 'lib/clever/types/course.rb', line 6

def district
  @district
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/clever/types/course.rb', line 6

def name
  @name
end

#numberObject (readonly)

Returns the value of attribute number.



6
7
8
# File 'lib/clever/types/course.rb', line 6

def number
  @number
end

#providerObject (readonly)

Returns the value of attribute provider.



6
7
8
# File 'lib/clever/types/course.rb', line 6

def provider
  @provider
end

#uidObject (readonly)

Returns the value of attribute uid.



6
7
8
# File 'lib/clever/types/course.rb', line 6

def uid
  @uid
end