Class: CourseScraper::Category
- Inherits:
-
Object
- Object
- CourseScraper::Category
- Defined in:
- lib/course_scraper/category.rb
Overview
Public: A Category of vocational courses that contains them.
Instance Attribute Summary collapse
-
#courses ⇒ Object
readonly
Returns the value of attribute courses.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, courses) ⇒ Category
constructor
Public: Initializes a new Category.
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
#courses ⇒ Object (readonly)
Returns the value of attribute courses.
5 6 7 |
# File 'lib/course_scraper/category.rb', line 5 def courses @courses end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/course_scraper/category.rb', line 5 def name @name end |