Class: Martlet::Schedule

Inherits:
Object
  • Object
show all
Defined in:
lib/martlet/schedule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent, semester, year) ⇒ Schedule

Returns a new instance of Schedule.



5
6
7
8
9
10
# File 'lib/martlet/schedule.rb', line 5

def initialize(agent, semester, year)
  @agent    = agent
  @semester = semester
  @year     = year
  @html     = fetch_schedule_html
end

Instance Attribute Details

#semesterObject (readonly)

Returns the value of attribute semester.



3
4
5
# File 'lib/martlet/schedule.rb', line 3

def semester
  @semester
end

#yearObject (readonly)

Returns the value of attribute year.



3
4
5
# File 'lib/martlet/schedule.rb', line 3

def year
  @year
end

Instance Method Details

#fetch_coursesObject



12
13
14
15
# File 'lib/martlet/schedule.rb', line 12

def fetch_courses
  parser = ScheduleParser.new(@html)
  parser.parse_courses
end