Class: LectiveSemester
- Defined in:
- lib/Appolo/Models/main_model/lective_semester.rb
Constant Summary collapse
- @@type_of_links =
'lectiveSemesters'
Instance Attribute Summary collapse
-
#start_year ⇒ Object
readonly
Returns the value of attribute start_year.
-
#term ⇒ Object
readonly
Returns the value of attribute term.
-
#term_name ⇒ Object
readonly
Returns the value of attribute term_name.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(json_str) ⇒ LectiveSemester
constructor
A new instance of LectiveSemester.
- #to_s ⇒ Object
Constructor Details
#initialize(json_str) ⇒ LectiveSemester
Returns a new instance of LectiveSemester.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/Appolo/Models/main_model/lective_semester.rb', line 11 def initialize(json_str) json_data = ModelUtils.check_json_info json_str super(json_data[ModelUtils::LECTIVE_ID], json_data[ModelUtils::SHORT_NAME], json_data[ModelUtils::LINKS], @@type_of_links) @start_year = json_data[ModelUtils::START_YEAR] @term = json_data[ModelUtils::TERM] @term_name = json_data[ModelUtils::TERM_NAME] end |
Instance Attribute Details
#start_year ⇒ Object (readonly)
Returns the value of attribute start_year.
7 8 9 |
# File 'lib/Appolo/Models/main_model/lective_semester.rb', line 7 def start_year @start_year end |
#term ⇒ Object (readonly)
Returns the value of attribute term.
7 8 9 |
# File 'lib/Appolo/Models/main_model/lective_semester.rb', line 7 def term @term end |
#term_name ⇒ Object (readonly)
Returns the value of attribute term_name.
7 8 9 |
# File 'lib/Appolo/Models/main_model/lective_semester.rb', line 7 def term_name @term_name end |
Instance Method Details
#to_s ⇒ Object
23 24 25 |
# File 'lib/Appolo/Models/main_model/lective_semester.rb', line 23 def to_s "#{@id} - #{@short_name} : #{@term_name} #{@start_year}" end |