Class: ActiveInTime::TimetableSession
- Inherits:
-
Object
- Object
- ActiveInTime::TimetableSession
- Defined in:
- lib/ait_connect/timetable_session.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(active_in_time, json) ⇒ TimetableSession
constructor
A new instance of TimetableSession.
- #name ⇒ Object
- #timetable_session_category ⇒ Object
Constructor Details
#initialize(active_in_time, json) ⇒ TimetableSession
Returns a new instance of TimetableSession.
5 6 7 |
# File 'lib/ait_connect/timetable_session.rb', line 5 def initialize(active_in_time, json) @active_in_time, @json = active_in_time, json end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
3 4 5 |
# File 'lib/ait_connect/timetable_session.rb', line 3 def json @json end |
Instance Method Details
#description ⇒ Object
17 18 19 |
# File 'lib/ait_connect/timetable_session.rb', line 17 def description @json["description"] end |
#id ⇒ Object
9 10 11 |
# File 'lib/ait_connect/timetable_session.rb', line 9 def id @json["id"] end |
#name ⇒ Object
13 14 15 |
# File 'lib/ait_connect/timetable_session.rb', line 13 def name @json["name"] end |
#timetable_session_category ⇒ Object
21 22 23 24 |
# File 'lib/ait_connect/timetable_session.rb', line 21 def return nil if !@json['timetable_session_category'] ActiveInTime::TimetableSessionCategory.new(@active_in_time,@json['timetable_session_category']) end |