Class: CourseScraper::Course

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

Overview

Public: A vocational course.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ Course

Public: Initializes a new Course.

name - the String name of the course type - the Symbol type of the course (either :high or :medium).



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

def initialize(name, type)
  @name = name
  @type = type
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end