Class: Teacher

Inherits:
Object
  • Object
show all
Defined in:
lib/magister/types/teacher.rb

Overview

This class represents the teacher object magister gives us.

Instance Method Summary collapse

Constructor Details

#initialize(rawParsed) ⇒ Teacher

Returns a new instance of Teacher.

Parameters:

  • rawParsed (Hash)

    The raw data, yet it has already been parsed (like with JSON.parse)

Since:

  • 1.1.0



10
11
12
13
14
# File 'lib/magister/types/teacher.rb', line 10

def initialize(rawParsed)
    @id = rawParsed["Id"]
    @name = rawParsed["Naam"]
    @abrev = rawParsed["Docentcode"]
end

Instance Method Details

#abrevString

The abreviation of the teacher

Returns:

  • (String)

    Abreviation

Since:

  • 1.1.0



31
32
33
# File 'lib/magister/types/teacher.rb', line 31

def abrev
    @abrev
end

#abreviatonString

The abreviation of the teacher

Returns:

  • (String)

    Abreviation

Since:

  • 1.1.0



37
38
39
# File 'lib/magister/types/teacher.rb', line 37

def abreviaton
    @abrev
end

#codeString

The abreviation of the teacher

Returns:

  • (String)

    Abreviation

Since:

  • 1.1.0



43
44
45
# File 'lib/magister/types/teacher.rb', line 43

def code
    @abrev
end

#idInteger

The id of the teacher

Returns:

  • (Integer)

    id

Since:

  • 1.1.0



19
20
21
# File 'lib/magister/types/teacher.rb', line 19

def id
    @id
end

#nameString

The name of the teacher

Returns:

  • (String)

    name

Since:

  • 1.1.0



25
26
27
# File 'lib/magister/types/teacher.rb', line 25

def name
    @name
end