Class: OsuCcScraper::Course
- Inherits:
-
Object
- Object
- OsuCcScraper::Course
- Defined in:
- lib/osu-cc-scraper/course.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Constructor Details
#initialize(args) ⇒ OsuCcScraper::Course
12 13 14 15 16 |
# File 'lib/osu-cc-scraper/course.rb', line 12 def initialize(args) args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end |
Instance Attribute Details
#course_number ⇒ String
9 10 11 |
# File 'lib/osu-cc-scraper/course.rb', line 9 def course_number @course_number end |
#subject_code ⇒ String
7 8 9 |
# File 'lib/osu-cc-scraper/course.rb', line 7 def subject_code @subject_code end |
Instance Method Details
#sections ⇒ Array<OsuCcScraper::Section>
19 20 21 22 |
# File 'lib/osu-cc-scraper/course.rb', line 19 def sections html = OsuCcScraper::Section::fetch(self.subject_code, self.course_number) OsuCcScraper::Section::parse(html) end |