Class: CourseUnit
- Defined in:
- lib/Appolo/Models/main_model/courses.rb
Constant Summary collapse
- @@type_of_links =
'courseunits'
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#programs ⇒ Object
readonly
Returns the value of attribute programs.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(json_info) ⇒ CourseUnit
constructor
A new instance of CourseUnit.
- #to_s ⇒ Object
Constructor Details
#initialize(json_info) ⇒ CourseUnit
Returns a new instance of CourseUnit.
10 11 12 13 14 15 16 17 18 |
# File 'lib/Appolo/Models/main_model/courses.rb', line 10 def initialize(json_info) super(json_info[ModelUtils::ID], json_info[ModelUtils::SHORT_NAME], json_info[ModelUtils::LINKS], @@type_of_links) @name = json_info[ModelUtils::NAME] #@programs = TODO end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/Appolo/Models/main_model/courses.rb', line 8 def name @name end |
#programs ⇒ Object (readonly)
Returns the value of attribute programs.
8 9 10 |
# File 'lib/Appolo/Models/main_model/courses.rb', line 8 def programs @programs end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/Appolo/Models/main_model/courses.rb', line 20 def to_s "#{@id} - #{@short_name}" end |