Class: ActiveInTime::TimetableSession

Inherits:
Object
  • Object
show all
Defined in:
lib/ait_connect/timetable_session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#jsonObject (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

#descriptionObject



17
18
19
# File 'lib/ait_connect/timetable_session.rb', line 17

def description
  @json["description"]
end

#idObject



9
10
11
# File 'lib/ait_connect/timetable_session.rb', line 9

def id
  @json["id"]
end

#nameObject



13
14
15
# File 'lib/ait_connect/timetable_session.rb', line 13

def name
  @json["name"]
end

#timetable_session_categoryObject



21
22
23
24
# File 'lib/ait_connect/timetable_session.rb', line 21

def timetable_session_category
  return nil if !@json['timetable_session_category']
  ActiveInTime::TimetableSessionCategory.new(@active_in_time,@json['timetable_session_category'])
end