Class: CourseScraper::Category

Inherits:
Object
  • Object
show all
Defined in:
lib/course_scraper/category.rb

Overview

Public: A Category of vocational courses that contains them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, courses) ⇒ Category

Public: Initializes a new Category.

name - the String name of the category courses - the Array of courses of the category



11
12
13
14
# File 'lib/course_scraper/category.rb', line 11

def initialize(name, courses)
  @name    = name
  @courses = courses || []
end

Instance Attribute Details

#coursesObject (readonly)

Returns the value of attribute courses.



5
6
7
# File 'lib/course_scraper/category.rb', line 5

def courses
  @courses
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/course_scraper/category.rb', line 5

def name
  @name
end