Class: Student
- Inherits:
-
Object
- Object
- Student
- Defined in:
- lib/work_together/student.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#progress ⇒ Object
Returns the value of attribute progress.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, progress) ⇒ Student
constructor
A new instance of Student.
Constructor Details
#initialize(name, progress) ⇒ Student
Returns a new instance of Student.
7 8 9 10 11 |
# File 'lib/work_together/student.rb', line 7 def initialize(name, progress) @name = name @progress = progress @@all << self end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/work_together/student.rb', line 5 def name @name end |
#progress ⇒ Object
Returns the value of attribute progress.
5 6 7 |
# File 'lib/work_together/student.rb', line 5 def progress @progress end |
Class Method Details
.all ⇒ Object
13 14 15 |
# File 'lib/work_together/student.rb', line 13 def self.all @@all end |