Class: Martlet::Schedule
- Inherits:
-
Object
- Object
- Martlet::Schedule
- Defined in:
- lib/martlet/schedule.rb
Instance Attribute Summary collapse
-
#semester ⇒ Object
readonly
Returns the value of attribute semester.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
- #fetch_courses ⇒ Object
-
#initialize(agent, semester, year) ⇒ Schedule
constructor
A new instance of Schedule.
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
#semester ⇒ Object (readonly)
Returns the value of attribute semester.
3 4 5 |
# File 'lib/martlet/schedule.rb', line 3 def semester @semester end |
#year ⇒ Object (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_courses ⇒ Object
12 13 14 15 |
# File 'lib/martlet/schedule.rb', line 12 def fetch_courses parser = ScheduleParser.new(@html) parser.parse_courses end |