Class: SIF::Model::Common::ScheduleInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/sif/models/common/schedule_info.rb

Instance Method Summary collapse

Instance Method Details

#first_meeting_timeObject



12
13
14
# File 'lib/sif/models/common/schedule_info.rb', line 12

def first_meeting_time
  meeting_times.first || Common::MeetingTime.new
end

#first_nonblank_teacherObject



20
21
22
# File 'lib/sif/models/common/schedule_info.rb', line 20

def first_nonblank_teacher
  teachers.find{ |t| !t.nil? and !t.empty? }
end

#first_teacherObject



16
17
18
# File 'lib/sif/models/common/schedule_info.rb', line 16

def first_teacher
  teachers.first
end

#teacherObject



24
25
26
# File 'lib/sif/models/common/schedule_info.rb', line 24

def teacher
  first_nonblank_teacher || first_teacher || String.new
end