Class: Subject
- Inherits:
-
Object
- Object
- Subject
- Defined in:
- lib/magister/types/subject.rb
Overview
This class represents a subject in magister in the sense of when it is linked to another object
Instance Method Summary collapse
-
#id ⇒ Integer, String
The id (or code) of the subject.
-
#initialize(rawParsed) ⇒ Subject
constructor
Returns a new instance of Subject.
-
#name ⇒ String
The name of the subject.
Constructor Details
#initialize(rawParsed) ⇒ Subject
Returns a new instance of Subject.
10 11 12 13 |
# File 'lib/magister/types/subject.rb', line 10 def initialize(rawParsed) @id = rawParsed["Id"] @name = rawParsed["Naam"] end |
Instance Method Details
#id ⇒ Integer, String
Note:
When initialized by Grade
it uses the code as the id to initialize
The id (or code) of the subject
20 21 22 |
# File 'lib/magister/types/subject.rb', line 20 def id @id end |
#name ⇒ String
Note:
When initialized by Grade
it uses the description as the name to initialize
The name of the subject
28 29 30 |
# File 'lib/magister/types/subject.rb', line 28 def name @name end |